Description
Snowblower Sales
A gaming store records the sales of snowblower (snowthrowers) during the colder months (October – March). The number of throwers sold is stored in a file named throwers.txt which contains 6 integer values, one per line. The first number is for October, the second for November, etc.
Write a program to calculate the total number of systems sold during the year, the average number sold per month, the month with the most sales, the month with the least sales, and the median number of sales.
For extra credit, create a frequency array, use it to find the mode and print a histogram of the data for the season.
Your program should have separate functions to:
- Read the data
- Find the number of the month with the most systems sold
- Find the number of the month with the least systems sold
- Find the total and average (mean)
- Sort the data
- Find the median
- Print the month name, given the month number (October = 1 …. March = 6).
- Display the highest month name, lowest month name, total, average, sorted data, and median
Design your program by completing the CSC 150 Program Design Document. Be sure to include a structure chart for the program, the prototype for each function, and a brief description of each function’s purpose.
Save the design in a file named ThrowerDesign_xxx.doc where xxx are your initials and submit it in the Program 7 Design drop box by the date shown in the calendar – this is before the program due date.
Code your program. Save it in a file named thrower_xxx.c where xxx are your initials.
Compile, run and test your program.
Submit your working .c file in the Program 7 drop box by the date shown in the calendar and drop box tools.