Program to generate following pattern for n lines.
A
B B
C C C
D D
D D
E E
E E E */
#include<conio.h>
#include<stdio.h>
void
main()
{
int i,j,n;
char c='A';
clrscr();
printf("\nEneter the no of lines to be
printed: ");
scanf("%d",&n);
for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
{
printf("%c",c);
}
c++;
printf("\n");
}
getch();
}
/* output
Eneter the no of
lines to be printed: 5
A
BB
CCC
DDDD
EEEEE*/