Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program in c++ that will: 1. Call a function to input temperatures for c

ID: 3649418 • Letter: W

Question

Write a program in c++ that will:
1. Call a function to input temperatures for consecutive days in 1D array. NOTE: The temperatures will be integer numbers. There will be no more than 10 temperatures.
The user will input the number of temperatures to be read. There will be no more than 10 temperatures.
2. Call a function to sort the array by ascending order. You can use any sorting algorithm you wish as long as you can explain it.
3. Call a function that will return the average of the temperatures. The average should be displayed to two decimal places.

Sample Run:
Please input the number of temperatures to be read
5
Input temperature 1:
68
Input temperature 2:
75
Input temperature 3:
36
Input temperature 4:
91
Input temperature 5:
84
Sorted temperature array in ascending order is 36 68 75 84 91
The average temperature is 70.80
The highest temperature is 91.00
The lowest temperature is 36.00

Explanation / Answer

you may also dowload the code from http://www.2shared.com/file/d8m-cqja/TEMP.html #include#include typedef int Temperature[50]; float getAvg(const Temperature,int); int getHigh(const Temperature,int); int getLow(const Temperature,int); void main() { int times; float avgValue; int highestValue; int lowestValue; Temperature temp; couttimes; for(int i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote