Question: a) Create a weather program that collects temperatures from a weatherman. Have the user enter the number of days of recorded temperatures and then record
a) Create a weather program that collects temperatures from a weatherman. Have the user enter the number of days of recorded temperatures and then record each temperature into an array. Once all the data is entered into the array then find the average temperature for those numbers of days. b) Using the same program from part (a), output how many days were above the average, then output all of the temperatures from the 7 days, and finally display the two coldest days and the two hottest days recorded. (Sample output is provided below) Java and simple level code please. Part a is done already just need part b
Sample Program:
How many days' temperatures? 7
Day 1's high temp: 45
Day 2's high temp: 44
Day 3's high temp: 39
Day 4's high temp: 48
Day 5's high temp: 37
Day 6's high temp: 46
Day 7's high temp: 53
Average temp = 44.6
4 days were above average.
Temperatures: [45, 44, 39, 48, 37, 46, 53]
Two coldest days: 37, 39
Two hottest days: 53, 48
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
