The average monthly temperatures for years 2010, 2011, 2012 and 2013 are shown in the table below.
You have been asked to write a program that will store these average temperature values for the months of
January to December for the year 2010, 2011, 2012 and 2013 into a two dimensional array. This information
will then be used to find the highest, lowest and the average temperatures.
JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC
2010 -16.1 -13.5 15.9 28.1 30.2 32.7 35.8 30.5 25.3 18.5 5.0 -1.5
2011 -15.1 -13.9 17.9 25.5 28.5 31.5 34.8 28.9 26.4 15.8 2.8 -2.8
2012 -21.1 -15.9 20.9 23.4 29.4 30.8 29.6 24.6 27.8 19.8 3.4 0
2013 -22.1 -13.9 19.9 21.6 31.2 29.5 33.2 35.1 24.6 14.3 5.7 -8
Instructions:
Create a 4-by-12-two-dimensional array to store double precision temperature values for each month of the
year for years 2010, 2011, 2012 and 2013. The values entered must then be used to calculate the high and low
and average temperatures for each year.
Your program should then allow the user to request for any of the following information:
• temperature for a month for a given year: e.g. temperature for the month of June for the year 2012 = 30.8
• High and low temperatures for any year: e.g. for the year 2011- the highest and lowest temperatures are -
34.8 and -15.1 respectively
• The average temperature for any year: e.g. the average temperature for year 2013 is 14.2
• The average monthly temperature: e.g. the average monthly temperature for the month of March is 18.65 Note:
• Validate all data entry.
• All numerical output must be formatted to display to two decimal places.
• Have appropriate commenting in your program and practice good programming skills. Your program
should be well documented and user friendly. The output format for the program can be of your own