Question: Use C++ Visual Studio Task 2: Exercise 1. One-dimensional arrays with enum indexes Create a new C++ project in Visual Studio, add a new C++

Use C++ Visual Studio Task 2: Exercise 1. One-dimensional arrays with enumUse C++

Visual Studio

Task 2: Exercise 1. One-dimensional arrays with enum indexes Create a new C++ project in Visual Studio, add a new C++ file and copy the following code into it: . // Program Favorit surveys users to determine the favorite soft drink.. #include .. using namespace std;0. enum Drinks {COKE, PEPSI, SPRITE, DR_PEPPER); void Prompt(); . int main() int favorites[4]; //holds sum of users who favor each drink int number; Drinks index:. for (index-COKE; index > number; - while (number !- 4) // FILL IN Code to increment the proper drink fvorites based on user selections // e.g. if user enter 0 increment favorites[COKE] etc Prompt(); cin > number; - // FILL IN THE Code to write out the totals in the format: Drink Number of favorites system("pause"); return 0; void Prompt) cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!