Question: Implement a program that declares a single - dimensional array to store temperature readings for each hour in a day . Initialize this array by

Implement a program that declares a single-dimensional array to store temperature readings for each hour in a day . Initialize this array by reading input values from the user .
b) Add functionality to set a threshold temperature. If the temperature exceeds this threshold at any hour, the program should print an alert, listing the day and time of each occurrence and Add functionality to provide a day summary of threshold violations, including the total number of alerts,
c) Modify the program to calculate and print the average temperature for each day and for the entire week. Extend the program to identify and display days where the average temperature is consistently above or below a user-defined threshold. Indicate the number of hours each day that exceed or fall below this threshold.
d) Enhance the program to automatically generate a weekly temperature report. Include daily averages, weekly average, highest and lowest temperatures.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!