Sectionย 1. Chapterย 6
single
Challenge: Calculate Average Temperature
Swipe to show menu
Task
Swipe to start coding
Write a program that calculates the average temperature from an array of integers.
- Use a for loop to sum all values in the
tempsarray. - Divide the sum by the number of elements in
tempsto find the average. - Return the average as a
doublevalue.
Solution
Everything was clear?
Thanks for your feedback!
Sectionย 1. Chapterย 6
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat