Question: A one - dimensional ( 1 D ) array Days [ ] contains the names of the days of the week. A two - dimensional
A onedimensional D array Days contains the names of the days of the week. A
twodimensional D array Readings is used to store temperature readings, taken once
an hour, for each of the seven days of the week. A D array AverageTemp is used to store the
average temperature for each day of the week.
The position of any days data is the same in all three arrays. For example, if Wednesday is
in index of Days Wednesdays temperature readings are in index of Readings and
Wednesdays average temperature is in index of AverageTemp
The temperature readings are in Celsius to one decimal place. Temperatures can only be from
deg C to deg C inclusive.
Write a program that meets the following requirements:
input and validate the hourly temperatures for one week
calculate and store the average temperature for each day of the week
calculate the average temperature for the whole week
convert all the average temperatures from Celsius to Fahrenheit by using the formula
Fahrenheit Celsius
output the average temperature in Celsius and in Fahrenheit for each day
output the overall average temperature in Celsius and in Fahrenheit for the whole week.
You must use pseudocode or program code and add comments to explain how your code works.
You do not need to declare any arrays, variables or constants; you may assume that this has
already been done.
All inputs and outputs must contain suitable messages.
All data output must be rounded to one decimal place.
You will need to initialise and populate the array Days at the start of the program.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
