Question: Can someone help me out with this C++ Problem using a do while loop?? Problem 1 - Count the ratings (NO FUNCTIONS) Write a program
Can someone help me out with this C++ Problem using a do while loop??

Problem 1 - Count the ratings (NO FUNCTIONS) Write a program that summarizes the results of customer product ratings. The program prompts users to input product ratings on a scale of 0 to 4. Input ends when -1 is entered. (THINK ABOUT HOW TO STRUCTURE THIS LOOP FIRST). The program needs to count the total number of each rating, in other words how many ratings of 0, 1, 2, 3, 4. To do this, you will create a ratings array that can hold 5 values which represents counters for each rating. Make sure to initialize the array elements to 0. The indexes of this array (0, 1, 2, 3, 4) correspond toa rating. So if the user enters 3, then 1 needs to be added to element 3 of the ratings array (it is now 0 + 1-1). If the user enters 0, then one is added to element 0 (it is now 1). If the user enters 3 again, the value is incremented (previous value of 11-2). When user input stops (-1 entered) you will then display each rating and a count of how many times it was entered. Make sure to validate that the user input is between 0 and 4 (don't go "out of bounds" on the array elements) Sample output (Test Case l Enter rating (0 to 4) or -1 to quit: 4 Enter rating (0 to 4) or -1 to quit: 2 Enter rating (0 to 4) or to quit: 5 invalid, must be 0 t 4 . Re-enter: 4 Enter rating (0 to 4) or -1 to quit: 2 Enter rating (0 to 4) or -1 to quit: 0 Enter rating (0 to 4) or -1 to quit: 4 Enter rating (0 to 4) or -1 to quit: -1 Ratings Summary Rating Count 1 2 3 4 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
