Newer
Older
#include <stdio.h>
int main() {
int numRows, i, j;
printf("Enter the number of alphabet words to print: ");
scanf("%d", &numRows);
// Loop for each row
for(i = 1; i <= numRows; i++) {
// Loop for each alphabet word in the current row
for(j = 1; j <= i; j++) {
printf("%c ", i + 64);
}
printf("\n");
}
return 0;
}