subject

4.2.2: Basic while loop with user input. Write an expression that executes the loop while the user enters a number greater than or equal to 0. Note: These activities may test code with different test values. This activity will perform three tests, with user input of 9, 5, 2, -1, then with user input of 0, -17, then with user input of -1. See "How to Use zyBooks" . Also note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds, and report "Program end never reached." The system doesn't print the test case that caused the reported message. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include using namespace std; int main() { int userNum; cin >> userNum; while (/* Your solution goes here */) { cout << "Body" << endl; cin >> userNum; } cout << "Done." << endl; return 0; } 1 test passed All tests passed Run

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 00:40, ndurairajownkpq
What social factors affect your health
Answers: 3
image
Computers and Technology, 24.06.2019 07:00, Dkhaurithompson
Selective is defined as paying attention to messages that are consistent with one’s attitudes and beliefs and ignoring messages that are inconsistent.
Answers: 1
image
Computers and Technology, 24.06.2019 20:20, puppylover72
3. write assignment statements that perform the following operations with the variables a, b, and c: a. adds 2 to a and assigns the result to b b. multiplies b times 4 and assigns the result to a c. divides a by 3.14 and assigns the result to b
Answers: 2
image
Computers and Technology, 24.06.2019 21:30, croxy0514
Jenny wants to create an animated short video to add to her website. which software will she use to create this animated video?
Answers: 1
You know the right answer?
4.2.2: Basic while loop with user input. Write an expression that executes the loop while the user e...

Questions in other subjects:

Konu
English, 25.09.2020 05:01
Konu
Mathematics, 25.09.2020 05:01