-->
write a c program to draw the following pattern-6.
/*
A
AB
ABC
ABCD
ABCDE
*/
#include
<stdio.h>
#include
<conio.h>
void main()
{
int i, j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%c",'A' + j-1);
}
printf("\n");
}
getch();
}
OUTPUT:
A
AB
ABC
ABCD
ABCDE
No comments:
Post a Comment