Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

Compare and contrast monochronic and polychronic time orientations

Answered: 1 week ago