Nested Loops
- Create triangle pattern
[]
[][]
[][][]
[][][][]
- Loop through rows
for (int i = 1; i <= n; i++)
{
// make triangle row
}
- Make triangle row is another loop
for (int j = 1; j <= i; j++)
r = r + "[]";
r = r + "\n";
- Put loops together → Nested loops