Question: Write a C program to: 1) read the number of sales, 2) read the item number and amount of each sale, 3) find the average

 Write a C program to: 1) read the number of sales,

Write a C program to: 1) read the number of sales, 2) read the item number and amount of each sale, 3) find the average sale amount, and 4) print a table of sales and the average sale as outlined below 1. Prompt the user for the number of sales. For each sale: 2. Read the item number, and a. b. sale amount. Compute average sale Print the table of item numbers and sale amounts. Print average sale with 2 digits beyond decimal point. 3. 4. 5. An example interaction with your program is shown below. User input is underlined: Enter number of sales: 3 Enter item number: 2342 Enter sale amount ($): 5.50 Enter item number: 4433 Enter sale amount ($): 7.50 Enter item number: 1123 Enter sale amount $): 5.00 2342 4433 1123 Average sale: $6.00 $5.50 $7.50 $5.00

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!