Answer to Question #111671 in C++ for lufunda manongo

Question #111671
QUESTION 1: LOOPING
1. Suppose we want to validate the data captured for two variables programsDone and result in a while loop. The loop should be repeated until the value of result is greater than or equal to 50 and the value of programsDone is greater than or equal to 5. The variables result and programsDone are both of type int. Complete the while loop below. You only have to write down the completed while loop. [5 Marks]
1
Expert's answer
2020-04-24T11:32:41-0400
int result;
int programsDone;
std::cout << "Key in the result followed by the number of programs done: " << endl;
std::cin >> result >> programsDone;
while (result <= 5 && programsDone <= 50) {
    result++;
    programsDone += 10;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS