CJCoding With Joseph
← Back to Question List
C# Code Walkthrough #39

Nested Loop Triangle

mediumLoops

📄 Code

Read carefully — what does this print?
1for (int i = 1; i <= 3; i++)
2{
3 for (int j = 1; j <= i; j++)
4 {
5 Console.Write("*");
6 }
7 Console.WriteLine();
8}

🎯 Your Answer