Write a C++ program that asks the user to enter 12 temperatures for each month in the year and store them in a one-dimensional array called “temps”.
The program should find and print the average temperature of TEN months after excluding the months with the maximum and the minimum temperatures.
Your program should run as follows:
[IMG]file:///C:/Users/sweet/AppData/Local/Temp/msohtmlclip1/01/clip_image001.gif[/IMG]
Enter temperature for month 1: 35
Enter temperature for month 2: 40
Enter temperature for month 3: 45
Enter temperature for month 4: 48
Enter temperature for month 5: 46
Enter temperature for month 6: 42
Enter temperature for month 7: 38
Enter temperature for month 8: 37
Enter temperature for month 9: 36
Enter temperature for month 10: 32
Enter temperature for month 11: 33
Enter temperature for month 12: 34
Average Temperature = 38.6
Press any key to continue…
The program should find and print the average temperature of TEN months after excluding the months with the maximum and the minimum temperatures.
Your program should run as follows:
[IMG]file:///C:/Users/sweet/AppData/Local/Temp/msohtmlclip1/01/clip_image001.gif[/IMG]
Enter temperature for month 1: 35
Enter temperature for month 2: 40
Enter temperature for month 3: 45
Enter temperature for month 4: 48
Enter temperature for month 5: 46
Enter temperature for month 6: 42
Enter temperature for month 7: 38
Enter temperature for month 8: 37
Enter temperature for month 9: 36
Enter temperature for month 10: 32
Enter temperature for month 11: 33
Enter temperature for month 12: 34
Average Temperature = 38.6
Press any key to continue…