about | help | code help+videos | done | prefs |
Write a method that has parameters 'nums', which is an array of positive integers, and 'mult'. Replace every multiple of 'mult' in 'nums' with a zero and then return that new array. Look at the test data for examples. quiz2020_12_02_APP1SLHL_replaceMultiples([15, 4, 8, 12, 22, 17, 23], 5) → [0, 4, 8, 12, 22, 17, 23] quiz2020_12_02_APP1SLHL_replaceMultiples([15, 4, 8, 12, 22, 17, 23], 2) → [15, 0, 0, 0, 0, 17, 23] quiz2020_12_02_APP1SLHL_replaceMultiples([8, 16, 80, 96, 100, 15], 8) → [0, 0, 0, 0, 100, 15] ...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