about | help | code help+videos | done | prefs |
apcsaArraysFindMultiples
Heads up, this is a harder problem. Congratulations on making it here! Given an array arr of int values and a multiple n, find all values in arr that are multiples of n and return those as a new array containing only their values (in their original order from arr). HINT: when you create a new array you need to know how many elements it stores. You might need two loops for this problem. CHALLENGE (difficult): solve this in one line.apcsaArraysFindMultiples([3, 4, 5, 6, 7, 8, 9], 3) → [3, 6, 9] apcsaArraysFindMultiples([3, 4, 5, 6, 7, 8], 3) → [3, 6] apcsaArraysFindMultiples([1, 9, 2, 10, 3, 8, 4], 2) → [2, 10, 8, 4] ...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: 260
Copyright Nick Parlante 2017 - privacy