Question: Write a program that declares three onedimensional arrays named price, quantity, and amount in main(). Each array should be capable of holding ten double precision

Write a program that declares three onedimensional arrays named price, quantity, and amount in main(). Each array should be capable of holding ten double precision numbers. Store the following numbers in price: 10.00, 14.01, 15.21, 74.21, 23.8, 61.26, 92.37, 12.73, 2.11, 58.98. Store the following numbers in quantity: 7,8,27,12,94,61,20,78,55,41. Your program should pass these three arrays to a function named extend(), which calculates the elements in amount as the product of the corresponding elements in the price and quantity arrays (for example, amount[1] = price[1] * quantity[1]). Display the numbers in amount in main()after extend() has put values in the amount array.

Code needs to be in C

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!