-->

Facebook

Jasper Roberts - Blog

Tuesday, October 14, 2014

write a c program to draw following pattern-7

/*
AAAAA
BBBB
CCC
DD
E
*/

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

void main()
{
    int i, j;
    clrscr();

     for(i=1;i<=5;i++)
     {
          for(j=5;j>=i;j--)
          {
                   printf("%c",'A'-1 + i);
          }
        
     printf("\n");
    }

     getch();


OUTPUT:
AAAAA
BBBB
CCC
DD
E


No comments:

Post a Comment