Solved

What Will Be Printed by the Statements Below

Question 20

Multiple Choice

What will be printed by the statements below?
Int val = 1;
Int sum = 0;
While (val < 5)
{
Sum = sum + val;
Val++;
}
System.out.print (sum) ;


A) 4
B) 5
C) 10
D) 15

Correct Answer:

verifed

Verified

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

Related Questions