about | help | code help+videos | done | prefs |
Create a function that takes two numbers as arguments 'num' and 'length' and returns an array of multiples of 'num' until the array length reaches 'length'. For example, if 'num' is 3 and 'length' is 5, you would return {3,6,9,12,15} because those are the first 5 multiples of 3. Look at the test data for more examples. Note: As preconditions you may assume that both 'num' and 'length' are positive. quiz2021_11_16_APSLHL_mults(3, 5) → [3, 6, 9, 12, 15] quiz2021_11_16_APSLHL_mults(2, 10) → [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] quiz2021_11_16_APSLHL_mults(1, 2) → [1, 2] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 220
Copyright Nick Parlante 2017 - privacy