Solved

What Is the Output of the Following Code Fragment

Question 59

Multiple Choice

What is the output of the following code fragment?
Int i = 1;
Int sum = 0;
While (i <= 15)
{
Sum = sum + i;
I++;
}
System.out.println("The value of sum is " + sum) ;


A) The value of sum is 0
B) The value of sum is 105
C) The value of sum is 120
D) The value of sum is 136

Correct Answer:

verifed

Verified

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

Related Questions