Question: PLEASE TYPE IN C++ PROGRAMMING LANGUAGE. PLEASE USE ARRAY AS WELL. Please type in C++ Programming language. Create a one dimensional array which holds the

PLEASE TYPE IN C++ PROGRAMMING LANGUAGE. PLEASE USE ARRAY AS WELL.

PLEASE TYPE IN C++ PROGRAMMING LANGUAGE. PLEASE USE ARRAY AS WELL. PleasePlease type in C++ Programming language.

Create a one dimensional array which holds the retail prices for product 1-5. This is the same problems as the assignment you already did, but instead of using the SWITCH statements you will use an array to get the same result. Product number Retail price 2 3 4 5 $2.98 $4.50 $9.98 $4.49 $6.87 Write a program that: 1. Initialize a one dimensional array with the retail prices, and then print the whole array content in one row with proper distance between each element of the array 2. Ask the user to choose between products 1-5 (-1 or any sentinel value to end), and then enter the quantity sold for that product. 3. Your code should calculate the total retail value of all products and display that value at the end. Hint: Use the product number entered by the user as the index of the retail price array to access the corresponding product's price. Multiply price by the product quantity and add to the sum total

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!