Solved

Write a "Query-Controlled" Loop That Will Continue to Input Int

Question 36

Essay

Write a "query-controlled" loop that will continue to input int values from the user, adding each to the int value sum, and then ask if the user has another value to input, until the user says that there are no more values. Assume that cs1.Keyboard has been imported.

Correct Answer:

verifed

Verified

int x, sum = 0;
String query;
do {
Syste...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions