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
intresult;
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;
}
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments