wap to print pattern like A AB ABC ABCD ABCDE
Answers
Answered by
2
Answer:
ABCDEF
Explanation:
next should be F because its in continuous letters
Answered by
6
Program
#include<stdio.h>
void main()
{
int i,j,n;
printf("Enter the number of rows\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
printf("%c",(char)(j+64));
}
printf("\n");
}
}
Explanation:
Output:
A
AB
ABC
ABCD
ABCDE
Similar questions