Example 1 — Grow a row with char++
Restart at 'A' on every row, then increment inside the inner loop.
#include <stdio.h>
int main(void) {
int rows = 5;
for (int row = 1; row <= rows; row++) {
char letter = 'A';
for (int col = 1; col <= row; col++) {
printf("%c", letter);
letter++;
}
printf("\n");
}
return 0;
} How It Works
- The outer
forsets how many letters this row prints. char letter = 'A'starts every row at A.letter++advances thechar;printf("\n")ends the row.

