subject

In c++ in this assignment, you will write a program that will read in a list of 12 doubles from a file. each double represents the total rainfall in inches for the 12 months of the year in month order. the 12 doubles should be written into an array. the program should do the following with the data: ? calculate the average rainfall for the year. ? determine which month had the lowest amount of rainfall. ? determine which month had the highest amount of rainfall. ? sort the array of rainfall in descending order (highest rainfall first) using a bubble sort. ? neatly display the average, minimum, and maximum rainfall. be sure to display the month of the minimum and maximum rainfalls. then display a table of month and rainfall amount from the sort that you did earlier. each of the monthly rainfall, average, minimum, and maximum rainfalls should be displayed to two decimal places. you will not be given a sample program for this assignment. you have already done a similar program for reading in values from a file and finding averages, minimums, and maximums. the most difficult part of the assignment will be to display the correct months with the correct rainfall values after you have sorted them. i would suggest using parallel arrays for rainfall and months and every time you swap array indices for rainfall, you do the same swap for the months. make sure you use good programming style. this includes commenting all your variables and commenting through your code. comments should explain why you are doing something. use good indentation (see my examples and the books examples for demonstration of good indentation). make sure variable names are self-documenting. make good use of white space. group logical sections together with one blank line between logical sections. your output should be neat and pleasant to read. make sure you follow the specifications. if you must, you can add to the program, but do not change the specifications in doing so. name your file pa4_lastname_firstname. cpp, replacing lastname with your actual last name and firstname with your actual first name. failure to properly name your file results in loss of points. cosc 1436 programming assignment 4 below is possible output for a sample run for this programming assignment: monthly rainfall for fort worth, tx 2014 minimum: september 0.06 maximum: august 4.34 monthly average for year: 1.77 sorted by total rainfall month inches august 4.34 may 3.40 june 3.26 november 2.13 october 2.09 april 1.74 march 1.45 december 1.13 july 0.98 february 0.41 january 0.33 september 0.06

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:50
Free points just awnser this. what should i watch on netflix
Answers: 2
question
Computers and Technology, 23.06.2019 15:20
An ou structure in your domain has one ou per department, and all the computer and user accounts are in their respective ous. you have configured several gpos defining computer and user policies and linked the gpos to the domain. a group of managers in the marketing department need different policies that differ from those of the rest of the marketing department users and computers, but you don't want to change the top-level ou structure. which of the following gpo processing features are you most likely to use? a, block inheritance b, gpo enforcement c, wmi filtering d, loopback processing
Answers: 3
question
Computers and Technology, 24.06.2019 02:40
Has anyone seen my grandma shes been gone for 4 years already
Answers: 1
question
Computers and Technology, 24.06.2019 16:30
Jenny needs to record the names of 30 students, write down the subjects they studied, and note their grades in each subject after the midsemester exams and the end-of-semester exams. she divides the midsemester and end-of-semester information into two separate worksheets, sheet 1 and sheet 2. how will she rename the two worksheets?
Answers: 2
You know the right answer?
In c++ in this assignment, you will write a program that will read in a list of 12 doubles from a fi...
Questions
Questions on the website: 13722362