Question: M 2 P 2 - Q 2 1 Code 4 : int sum = 0 ; int number = 1 ; while ( number s
MPQ
Code :
int sum ;
int number ;
while number s
sum sum number;
number ;
System.out.printlnsum;
Code also contains a sequencegenerating
loop. The variable number is initialized, tested, and
updated the same way as in Code What values
does variable sum take on from line to line
What does the code print?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
