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

bookChallenge: Calculate Average Temperature

Tehtävä

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.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 6
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

bookChallenge: Calculate Average Temperature

Pyyhkäise näyttääksesi valikon

Tehtävä

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.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 6
single

single

some-alt