Answered step by step
Verified Expert Solution
Link Copied!

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++ #include  using 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

From Zero To Data Hero With Chatgpt

Authors: Andrew Wu

1st Edition

B0CQRJPXD9, 979-8989523009

More Books

Students also viewed these Databases questions

Question

Identify the types of informal reports.

Answered: 1 week ago

Question

Write messages that are used for the various stages of collection.

Answered: 1 week ago