What is wrong with the following while loop? while (sum<= 1000) { sum = sum – 30; }

a. The parentheses should be braces.
b. There should be a semicolon after while (sum <= 1000).
c. sum = sum – 30 should be sum = sum + 30 or else the loop may never end.
d. None of the above.

c. sum = sum – 30 should be sum = sum + 30 or else the loop may never end.

Computer Science & Information Technology

You might also like to view...

Transmission capacity is called ________

A) gigabyte B) streaming C) bandwidth D) IPv6

Computer Science & Information Technology

The SQL WHERE keyword specifies the:

A) criteria that records must match to be included in the results. B) table that will be searched. C) specific field to be included in the query. D) specific fields to include in the query.

Computer Science & Information Technology