Challenge: Even Number Collector
Taak
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.
Oplossing
solution.java
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 4
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Awesome!
Completion rate improved to 9.09
Challenge: Even Number Collector
Veeg om het menu te tonen
Taak
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.
Oplossing
solution.java
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 4
single