- This is a solution for the question below:
- A data logger records the temperature on the roof of a school twice a day, at midday and midnight. Input and store the temperatures recorded for a month. You must store the temperatures in two one-dimensional arrays, one for the midday temperatures and one for the midnight temperatures. All the temperatures must be validated on entry and any invalid temperatures rejected. You must decide your own validation rules. You may assume that there are 30 days in a month.
- Calculate the average temperature for midday and the average temperature for midnight. Output these averages with a suitable message for each one.
- Select the day with the highest midday temperature and the day with the lowest midnight temperature. Then output each of these temperatures, the corresponding day and a suitable message. Your program must include appropriate prompts for the entry of data. Error messages and other outputs need to be set out clearly and understandably. All variables, constants and other identifiers must have meaningful names. Each task must be fully tested.