What is the value of count after the loops? int count = 0;
What is the value of count after the loops?
int count = 0;
for (int i = 1; i <= 3; i++)
for (int j = 1; j <= i; j++)
count++;
Show answerHide answer
Correct answer: (B) 6
Explanation
1 + 2 + 3 = 6.