1.

Shantanu wants to make a program to print the sum of the first 7 multiples of 6. He writes the following program: integer i = 0 // statement 1 integer sum // statement 2 while ( i <= 42 ) // statement 3 { sum = sum + i // statement 4 i = i + 6; } print sum // statement 6 Does this program have an error? If yes, which one statement will you modify to correct the program?

A. Statement 1
B. Statement 2
C. Statement 3
D. Statement 4
Answer» C. Statement 3


Discussion

No Comment Found

Related MCQs