Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help to fill out the code. I marked it as comment // down below. Please take a look. C++ #include using namespace std;
I need help to fill out the code. I marked it as comment // down below. Please take a look. C++ #includeusing namespace std; int main() { int lowest = 10; int highest = 0; int count = 0; int sum = 0; while(true) { cout << "1- Submit Rating" << endl; cout << "2- View Rating" << endl; cout << "3- Reset Rating" << endl; cout << "0- Exit" << endl; cout << "What now? "; int choice; cin >> choice; if (choice == 1) { int rating; cout << "Rating: "; cin >> rating; if (rating > 4 || rating < 1){ cout << "You must enter number from 1 to 4."<< endl; } else { if (rating < lowest) { lowest = rating; } if (rating > highest) { highest = rating; } // add rating to sum // increment count } } else if (choice == 2){ // print lowest, highest and sum / count } else if (choice == 3){ // set count to 0 ## // set sum to 0 // set highest to 0 // set lowest to 10 } else if (choice == 0) { break; } } system("PAUSE"); return 0; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started