CSC 150, Computer Science 1.

Added on -2019-09-16

| 1 pages
| 340 words

Trusted by 2+ million users,
1000+ happy students everyday

Showing pages 1 to 1 of 1 pages

CSC 150, Computer Science 1Programming Assignment 7Arrays85 PointsDog AdoptionsThe total number of dogs adopted out each month from a dog shelter is stored in a data file named dogs.txt. The file contains up to 12 numbers, each written on a separate line. Assume that the first amount is for January, the second for February, etc.Write a program to figure out which month had the most adoptions, which month had the least adoptions, the total and average number of adoptions per month and the median number of adoptions per month. Read the data from the dogs.txt file. Be sure to count the scores as you read them. Return the count to main and use it in the rest of your program to process your partially-filled array.Your program should have separate functions to: Read the dataDisplay the number of the month with the most adoptionsDisplay the number of the month with the least adoptionsFind the total and average (mean)Sort the dataFind the medianDisplay the highest month number, lowest month number, total, average, and sorted dataDesign 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 DogsDesign_xxx.doc where xxx are your initials and submit it inthe 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 dogs_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.

Found this document preview useful?

You are reading a preview
Upload your documents to download
Become a Desklib member to get accesss

Students who viewed this