Challenge: Calculate Average Temperature
Taak
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.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 6
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Geweldig!
Completion tarief verbeterd naar 5.56
Challenge: Calculate Average Temperature
Veeg om het menu te tonen
Taak
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.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 6
single