subject

Write a C program that reads sales data from a file called sales. txt. Each line of the file contains four data items; 1. A product number which is an integer 2. A product name which is a string no longer than 12 characters and which does not contain spaces 3. A unit price which is a double 4. A number of units sold which is an integer The program will output the two products which generated the highest total revenue (unit price * number sold). Your program must: 1. Read each line of the file storing the four items into the members of a dynamically allocated structure. 2. Store pointers to the structures in an array. 3. Sort the array of pointers by total revenue 4. Display the product name and total revenue of the top two products 5. The program must work for sales. txt files with anywhere from 2 to 100 products

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:00
If a client wants to make minor edits, what should he/she use?
Answers: 3
question
Computers and Technology, 23.06.2019 05:00
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
How much current flows through the alternator brushes? a. 2–5 a b. 25–35 a, depending on the vehicle c. 5–10 a d. 10–15 a
Answers: 2
You know the right answer?
Write a C program that reads sales data from a file called sales. txt. Each line of the file contain...
Questions
question
Mathematics, 15.01.2021 14:00
question
Mathematics, 15.01.2021 14:00
question
Mathematics, 15.01.2021 14:00
question
Mathematics, 15.01.2021 14:00
Questions on the website: 13722360