Challenge: Array Loops
Tarefa
Swipe to start coding
Your task is to calculate the total sales for a set of days using a method.
- Create a method
CalculateTotalSalesthat:- Accepts an array of
doublevalues representing daily sales. - Uses a for loop to iterate through the array.
- Calculates the total sum of all sales.
- Returns the total as a
double.
- Accepts an array of
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 5. Capítulo 6
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Incrível!
Completion taxa melhorada para 1.25
Challenge: Array Loops
Deslize para mostrar o menu
Tarefa
Swipe to start coding
Your task is to calculate the total sales for a set of days using a method.
- Create a method
CalculateTotalSalesthat:- Accepts an array of
doublevalues representing daily sales. - Uses a for loop to iterate through the array.
- Calculates the total sum of all sales.
- Returns the total as a
double.
- Accepts an array of
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 5. Capítulo 6
single