int i = 1, j = 1; for (i = 1; i < 4; i++) { for (j = 1; j < 4; j++) { Console.Wr
ID: 3773282 • Letter: I
Question
int i = 1, j = 1;
for (i = 1; i < 4; i++)
{
for (j = 1; j < 4; j++)
{
Console.Write("{0}{1} ", i, j);
}
}
three
four
nine
16
int i = 1, j = 1;
for (i = 1; i < 4; i++)
{
for (j = 1; j < 4; j++)
{
Console.Write("{0}{1} ", i, j);
}
}
Explanation / Answer
for(i = 1; i < 4; i++);
Considering this, the loop starts with i value of 1, and will proceed as long as i value is less than 4, which is gradually increased by 1.
Therefore the loop runs for values, 1, 2, and 3. When the i value becomes 4, the condition (i < 4) fails, and therefore, the outer loop exits.
Hence the answer for your question is: three.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.