about | help | code help+videos | done | prefs |
Write a method that returns an array of numbers starting with 'first' and going to 'last' but with all the multiples of 'skip' replaced with a zero. For example, if 'first' is 3, 'last' is 9, and 'skip' is 4, you would return [3,0,5,6,7,0,9] because you counted from 3 to 9 but replaced the two multiples of 4 (4 and 8) with zeros. Pre-conditions: last>=first>0 skip>1 Look at the test data for additional examples. quiz2023_02_28_APP1SLHL_countSkip(773, 773, 12) → [773] quiz2023_02_28_APP1SLHL_countSkip(1800, 1800, 2) → [0] quiz2023_02_28_APP1SLHL_countSkip(1800, 1800, 57) → [1800] ...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: 230
Copyright Nick Parlante 2017 - privacy