Bir hammadde karakteri giriyorsunuz. Birde kenar uzunlugu giriyorsunuz. Program size o karakteri kullanarak bir dörthen oluşturuveriyor..


 


#include <stdio.h>
void square(int,char);
main()
{
int side;
char fillCharacter;
printf(“Enter a character and the side length :”);
scanf(“%c%d”,&fillCharacter,&side);
square(side,fillCharacter);
}
void square(int side,char fillCharacter)
{
int i,j;
for(i=1;i<=side;i++){
 for(j=1;j<=side;j++){
 printf(“%c”,fillCharacter);
 }
printf(”
“);
}
}



 


Kaynak: Doğu Akdeniz Univ. CSIT Labworks
belgesi-429
Belgeci

Share
Published by
Belgeci

Recent Posts

İlk Cep Telefonu

ÖZELLİKLER: Boyut: 28x8x6 cm Ağırlık: 850gr Ekran: Yok Devre sayısı: 30 Konuşma süresi: 35 dakika…

12 saat ago

Basic Grammar-Questions

There are two kinds of questions: yes or no questions and wh- questions. You ask…

24 saat ago

Basic Grammar-Positive And Negative Sentences

A positive sentence tells you that something is so. A sentence that tells you something…

1 gün ago

Basic Grammar-The Imperative

Use the base form of a verb to give commands or make direct requests. This…

2 gün ago

Basic Grammar-Sentences

A sentence is a group of words that expresses a complete thought. A sentence must…

2 gün ago

Basic Grammar-Interjections

An interjection is a word that expresses a sudden, strong feeling such as surprise, pain,…

3 gün ago