Challenge: Even Number Collector
Tehtävä
Swipe to start coding
Calculate the total expenses from a list of daily expenses using a for loop.
- Create a variable named
totaland set it to0.0— this will store the running sum of expenses. - Use a for loop to go through each element in the
expensesarray. - In each iteration, add the current expense to
total. - After the loop finishes, return the
totalvalue.
Ratkaisu
solution.java
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 1. Luku 4
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Awesome!
Completion rate improved to 9.09
Challenge: Even Number Collector
Pyyhkäise näyttääksesi valikon
Tehtävä
Swipe to start coding
Calculate the total expenses from a list of daily expenses using a for loop.
- Create a variable named
totaland set it to0.0— this will store the running sum of expenses. - Use a for loop to go through each element in the
expensesarray. - In each iteration, add the current expense to
total. - After the loop finishes, return the
totalvalue.
Ratkaisu
solution.java
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 1. Luku 4
single