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