Write a program that will input temperatures for consecutive days. The program w
ID: 3657894 • Letter: W
Question
Write a program that will input temperatures for consecutive days. The program will store these values into an array and call a function that will return the average of the temperatures. It will also call a function that will return the highest temperature and a function that will return the lowest temperature. The user will input the number of temperatures to be read. There will be no more than 50 temperatures. Use typedef to declare the array type. The average should be displayed to two decimal places.
Sample Output:
Please input the number of temps to be read: 5
Input temp 1: 68
Input temp 2: 75
Input temp 3: 36
Input temp 4: 91
Input temp 5: 84
The avg temp is 70.0
The highest temp is 91.0
The lowest temp is 36.
Explanation / Answer
#include #include #include typedef int temp[50]; int n; void main() { int i; coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.