Solved

What Will Be Printed by the Statements Below

Question 75

Multiple Choice

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


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

Correct Answer:

verifed

Verified

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

Related Questions