Challenge: Calculate Average Temperature
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
Awesome!
Completion rate improved to 5.56
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