Challenge: Generate Multiples
Task
Swipe to start coding
Write a method that 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.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 2
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 8.33
Challenge: Generate Multiples
Swipe to show menu
Task
Swipe to start coding
Write a method that 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.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 2
single