Menu

Output Following Program Segment Sum 0 0 Sum Sum 1 Q43840188

What is the output of the following program segment?

sum=0;

i=0;

do {

sum = sum + i;

i=i+1; }

} while (i<=5);

System.out.print(sum);

Expert Answer


Answer to What is the output of the following program segment? sum=0; i=0; do { sum = sum + i; i=i+1; } } while (i…

OR