The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 4 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Please see attached question, let me know if you need more info thank you
Â
ENGR 200FALL 2016P7: RAINFALL ANALYSIS(using input/output files, if structures, for loops, a two-dimensional array, anda one-dimensional character array)DUE:POINTS: 65INTRODUCTION:You are a civil engineer working as an urban planner for Grand Forks, ND. Data has been collected dealing withtotal precipitation amounts for the city as part of designing the new water treatment plant, and you are requiredto develop a computer program that will perform precip averaging analysis. The input data file is calledprecip.As you examine the input file, you notice that the first record line is the name of the city and type of data, thesecond record line contains the control numbers, and the remaining record lines are the total precipitationamounts: 12 rows (January – December) and 5 years (2011 – 2015).ASSIGNMENT:Write a C program that will read the data from the input file, such that the city name and type of data are storedin a one-dimensional character array, and the rainfall amounts are store in a two-dimensional array.Manipulatethe two-dimensional array to calculate the total rainfall for each year, the average rainfall for each year, and thestandard deviation in rainfall for each year. Then find the minimum and maximum rainfalls and the locations inthe array of the minimum and maximum values.The formula for standard deviation is:s=√∑(x−´x)2n−1where s is the standard deviation, x is the individual sample values, x is the mean value, Σ is the summation,±and n-1 is the number of values in the sample minus 1. In this case, n is 12 (number of months in the year) andx is the yearly average of rainfall.±Print the output to the computer screen and to an output file calledprecip_report. Illustrated below is theoutput style for the computer screen and the output file.OUTPUT FORMAT:1
GrandForks-EquivalentPrecip12 50.85 0.38 0.42 0.68 0.420.04 0.51 0.37 0.56 0.400.76 1.79 0.98 0.93 0.312.40 1.45 1.61 2.62 0.732.45 1.75 4.79 2.56 4.453.34 2.38 3.10 6.60 2.512.69 3.35 2.08 3.70 5.103.23 2.01 0.88 3.20 2.892.89 0.20 1.97 1.29 0.840.39 2.14 2.48 0.37 1.200.12 0.85 0.15 0.31 1.400.65 0.31 0.85 0.22 1.06
Attachments:
-----------