Create a program that finds the average min.temp, max.temp, rainfall and total rainfall a given month. The program will work as follows: First, the computer asks for the number of days in the month. This should be a number between 28 and 31 Then goes through as many days (as the user typed), and for each of them queried for the given current min.temp, max.temp and mm rainfall. Min.temp. should be in the range of -70 to 70, Max.temp should be in the range min.temp to 70 Rainfall should be in the range of 0 to 200 When all data fully scanned, the following shall be printed on the current month: Average min.temp Average max.temp Average rainfall Total rainfall Finally, ask the user if he / she will read the data for another month. If so, start the program at the point where it is asked about the number of days in the month. Otherwise, exit the program with a positive / pleasant message. NB1: All figures scanned may well be integers, while the averages printed should be float. NB2: Use const as much as possible |
|
|
|
|
|
|
|
|