Solved

What Is the Output of the Code Below? for (Int

Question 92

Multiple Choice

What is the output of the code below? for (int val = 0; val < 4; val ++)
{
Int sum = val;
For (int num = 0; num < val; num++)
{
Sum = sum + num;
}
System.out.print (sum + " ") ;
}


A) 0 1 3 6
B) 0 1 4 10
C) 0 2 5 9
D) 0 2 7 16

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions