Challenge: Generate Multiples
Aufgabe
Swipe to start coding
Write a method GenerateMultiples that receives number and limit parameters, and returns an array of multiples of a given number up to a specified limit.
- The method must return an array containing all multiples of
numberthat are less than or equal tolimit. - If
numberis zero or greater thanlimit, the method must return an empty array. - The array must contain the multiples in ascending order, starting from
numberup to the largest multiple not exceedinglimit.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 2. Kapitel 2
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Suggested prompts:
Can you explain this in simpler terms?
What are the main takeaways from this?
Can you give me a real-world example?
Großartig!
Completion Rate verbessert auf 8.33
Challenge: Generate Multiples
Swipe um das Menü anzuzeigen
Aufgabe
Swipe to start coding
Write a method GenerateMultiples that receives number and limit parameters, and returns an array of multiples of a given number up to a specified limit.
- The method must return an array containing all multiples of
numberthat are less than or equal tolimit. - If
numberis zero or greater thanlimit, the method must return an empty array. - The array must contain the multiples in ascending order, starting from
numberup to the largest multiple not exceedinglimit.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 2. Kapitel 2
single