///pattern
int main()
{
int i,rows,n;
char j;
printf("Enter the number of rows: ");
scanf("%d",&rows);
for(i=65;i<=65+rows;i++)
{
for(j=65;j<i;j++)
{
printf("%c ",j);
}
printf("\n");
}
return 0;
}
output:
A
AB
ABC
ABCD
ABCDE
ABCDEF
ABCDEFG
ABCDEFGH
No comments:
Post a Comment