Tuesday, August 13, 2019

Alphabet pattern 12

Alphabet pattern 12:


Alphabet pattern in cprograms.


     A
    CCC
   EEEEE
  GGGGGGG
 IIIIIIIII

#include<stdio.h>
#include<conio.h>

void main()
{
int i,j,k,l=0;
clrscr();
for(i=1;i<=5;i++)
{
for(j=5;j>=i;j--)
{
printf(" ");
}
for(k=1;k<=2*i-1;k++)
{
printf("%c",l+65);
}
l=l+2;
printf("\n");
}
getch();
}


EmoticonEmoticon