Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Calculate Average Temperature | For Loops: Fundamentals and Applications
Quizzes & Challenges
Quizzes
Challenges
/
C# Loops Practice

bookChallenge: 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 temps array.
  • Divide the sum by the number of elements in temps to find the average.
  • Return the average as a double value.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 6
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

close

Awesome!

Completion rate improved to 5.56

bookChallenge: 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 temps array.
  • Divide the sum by the number of elements in temps to find the average.
  • Return the average as a double value.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 6
single

single

some-alt