Abschnitt 1. Kapitel 50
single
Challenge: Array Loops
Swipe um das Menü anzuzeigen
Aufgabe
Wischen, um mit dem Codieren zu beginnen
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
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 50
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen