Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++

image text in transcribedUse 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

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_2

Step: 3

blur-text-image_3

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

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions

Question

=+5 How does HRM relate to efforts to increase innovation?

Answered: 1 week ago