Example 1 — Grow a row with char++
Restart at 'A' on every row, then increment inside the inner loop.
using System;
class CharTriangle
{
static void Main()
{
int rows = 5;
for (int row = 1; row <= rows; row++)
{
char letter = 'A';
for (int col = 1; col <= row; col++)
{
Console.Write(letter);
letter++;
}
Console.WriteLine();
}
}
} How It Works
- The outer
forsets how many letters this row prints. char letter = 'A'starts every row at A.letter++advances thechar;WriteLineends the row.

