Levels Tought:
University
Teaching Since: | Apr 2017 |
Last Sign in: | 345 Weeks Ago, 6 Days Ago |
Questions Answered: | 9562 |
Tutorials Posted: | 9559 |
bachelor in business administration
Polytechnic State University Sanluis
Jan-2006 - Nov-2010
CPA
Polytechnic State University
Jan-2012 - Nov-2016
Professor
Harvard Square Academy (HS2)
Mar-2012 - Present
Â
Write a program that calculates the average rainfall for three months.
The program should ask the user to enter the name of each month, such as June or July, and the amount of rain (in inches) that fell each month.
The program should display a message similar to the following:
       The average rainfall for June, July, and August is 6.72 inches.
Prompts And Output Labels: Each month read should be prompted for by the string "Enter month: "
and each rainfall amount should be prompted for by a string of the form "Enter rainfall for MONTH: " where MONTH is the name of the month that was just entered.
The output should be of the form: "The average rainfall for MONTH1, MONTH2, and MONTH3 is: AVERAGE"
where MONTH1, MONTH2, and MONTH3 are the month names that were entered by the user and
where AVERAGE is the calculated average rainfall shown with exactly two digits past the decimal point.
-----------