CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Nested Loop Iteration Count

C# code walkthrough · Question 20
mediumLoops

Code

Read carefully. What does this print?
1int count = 0;
2for (int i = 0; i < 3; i++)
3{
4 for (int j = 0; j < 2; j++)
5 {
6 count++;
7 }
8}
9Console.WriteLine(count);

Your answer