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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 05:30, lolololol21
Cómo pongo un tomo de llamada sin pagar?
Answers: 1
image
Computers and Technology, 24.06.2019 12:10, breezer20042
What is it called during the editing process when the processor ensures that a character holding a coffee mug from one angle is holding the same mug in the same way when the shot switches to another camera at another angle? cinematography continuity technology prop use
Answers: 1
image
Computers and Technology, 24.06.2019 17:40, orlandokojoasem1234
Write an assembly language program to input a string from the user. your program should do these two things: 1. count and display the number of words in the user input string. 2. flip the case of each character from upper to lower or lower to upper. for example if the user types in: "hello there. how are you? " your output should be: the number of words in the input string is: 5 the output string is : hello there. how are you?
Answers: 2
image
Computers and Technology, 24.06.2019 21:40, Jsusussueususu
is on drugs i swear i ask a question and its not showing whats going
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 in other subjects:

Konu
Chemistry, 30.10.2020 14:00
Konu
Biology, 30.10.2020 14:00
Konu
Arts, 30.10.2020 14:00