Question: Write, compile, and run a C++ program that specifies three one-dimensional arrays named price, amount, and total. Each array should be capable of holding 5

Write, compile, and run a C++ program that specifies three one-dimensional arrays

named price, amount, and total. Each array should be capable of holding 5 elements.

Using a for loop, input values for the price and amount arrays. The entries in the total

array should be the product of the corresponding values in the price and amount arrays (so total[i] = price[i] * amount[i]). After all the data has been entered, display the following output, with the corresponding value under each column heading:

total price amount

------ ------- -----------

Design:

Code:

Output:

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!