What is wrong with the following while loop?
While sum <= 1000 )
Sum = sum - 30;
A) The parentheses should be braces.
B) Braces are required around sum = sum - 30;.
C) There should be a semicolon after while sum <= 1000 ) .
D) sum = sum - 30 should be sum = sum + 30 or else the loop may never end.
Correct Answer:
Verified
Q2: In indefinite repetition, an input value:
A) Should
Q4: Which operation does not take place in
Q4: Which of the following encompasses the other
Q7: If grade has the value of 60,
Q8: Indefinite repetition is controlled by a:
A) Counter.
B)
Q11: Using a while loop's counter-control variable in
Q11: What is the final value of x
Q12: An uninitialized local variable contains:
A) The value
Q14: The data type bool:
A) Can take on
Q15: Which of the following is a double-selection
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents