Question: c++ Write a program that declares three one dimensional arrays named price, quantity, and amount. Each array should be declared in main() and should be
c++

Write a program that declares three one dimensional arrays named price, quantity, and amount. Each array should be declared in main() and should be capable of holding ten double-precision numbers. Populate the array price with randomly generated numbers between 10.0 and 50.0 in double precision data type. Populate the array quantity with randomly generated integers between 20 and 90. You program should pass these three arrays to a function named extend), which should calculate the elements in the amount array as the product of the corresponding elements in the price and quantity arrays (for example, amount [1] = price [1] * quantity]). After extend() have put values into the amount array, the array should be display from within main()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
