Weekly Temperature Report
mediumQuestion 544An array<double, 7> named temps holds one temperature per day of the week: {24.5, 26.0, 31.5, 22.0, 28.0, 25.5, 27.3}.
Find the highest value, the lowest value and the average (sum divided by 7), then print three lines labelled High, Low and Average, as shown in Expected Output. Print every number with exactly one decimal place using fixed and setprecision(1) from <iomanip>.
Expected output
High: 31.5 Low: 22.0 Average: 26.4
= newline. The output ends with a newline, so print one after the last line.
Hints4 available
Sign in to use hintsTopics
STL Containersstd::array
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.