Girdi ve Çıktı:
C ile yazıldı.
#include
#include
char line1[999];
char line2[999];
char line3[999];
char line4[999];
char line5[999];
char line6[999];
char line7[999];
int line1Counter = 0;
int line2Counter = 0;
int line3Counter = 0;
int line4Counter = 0;
int line5Counter = 0;
int line6Counter = 0;
int line7Counter = 0;
void initializeArrays(char text[])
{
int i,j;
char character = '*';
for(i=0; i {
// Harf E
if (text[i]=='E')
{
for(j=0; j<10; j++)
{
line1[line1Counter] = character;
line1Counter++;
}
line1[line1Counter] = ' ';
line1Counter++;
line2[line2Counter] = character;
line2Counter++;
for(j=0; j<10; j++)
{
line2[line2Counter] = ' ';
line2Counter++;
}
line3[line3Counter] = character;
line3Counter++;
for(j=0; j<10; j++)
{
line3[line3Counter] = ' ';
line3Counter++;
}
for(j=0; j<5; j++)
{
line4[line4Counter] = character;
line4Counter++;
}
for(j=0; j<6; j++)
{
line4[line4Counter] = ' ';
line4Counter++;
}
line5[line5Counter] = character;
line5Counter++;
for(j=0; j<10; j++)
{
line5[line5Counter] = ' ';
line5Counter++;
}
line6[line6Counter] = character;
line6Counter++;
for(j=0; j<10; j++)
{
line6[line6Counter] = ' ';
line6Counter++;
}
for(j=0; j<10; j++)
{
line7[line7Counter] = character;
line7Counter++;
}
line7[line7Counter] = ' ';
line7Counter++;
}
// Harf F
if (text[i]=='F')
{
for(j=0; j<10; j++)
{
line1[line1Counter] = character;
line1Counter++;
}
line1[line1Counter] = ' ';
line1Counter++;
line2[line2Counter] = character;
line2Counter++;
for(j=0; j<10; j++)
{
line2[line2Counter] = ' ';
line2Counter++;
}
line3[line3Counter] = character;
line3Counter++;
for(j=0; j<10; j++)
{
line3[line3Counter] = ' ';
line3Counter++;
}
for(j=0; j<5; j++)
{
line4[line4Counter] = character;
line4Counter++;
}
for(j=0; j<6; j++)
{
line4[line4Counter] = ' ';
line4Counter++;
}
line5[line5Counter] = character;
line5Counter++;
for(j=0; j<10; j++)
{
line5[line5Counter] = ' ';
line5Counter++;
}
line6[line6Counter] = character;
line6Counter++;
for(j=0; j<10; j++)
{
line6[line6Counter] = ' ';
line6Counter++;
}
line7[line7Counter] = character;
line7Counter++;
for(j=0; j<10; j++)
{
line7[line7Counter] = ' ';
line7Counter++;
}
}
}
}
void drawLines()
{
int i,j;
printf("\n");
// Line 1
for(i=0; i {
printf("%c",line1[i]);
}
printf("\n");
// Line 2
for(i=0; i {
printf("%c",line2[i]);
}
printf("\n");
// Line 3
for(i=0; i {
printf("%c",line3[i]);
}
printf("\n");
// Line 4
for(i=0; i {
printf("%c",line4[i]);
}
printf("\n");
// Line 5
for(i=0; i {
printf("%c",line5[i]);
}
printf("\n");
// Line 6
for(i=0; i {
printf("%c",line6[i]);
}
printf("\n");
// Line 7
for(i=0; i {
printf("%c",line7[i]);
}
printf("\n");
printf("\n");
printf("\n");
printf("\n");
}
int main()
{
char text[50];
printf("Yazilacak yaziyi giriniz: ");
scanf("%s",text);
initializeArrays(text);
drawLines();
}
Kolay gelsin.