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
Get step-by-step solutions from verified subject matter experts
