about | help | code help+videos | done | prefs |
Define a function that when passed two integers (say n and k), returns the number of integers in the range 1 to n, that are divisible by k. countMultiples(100, 7) → 14 countMultiples(10000, 13) → 769 countMultiples(1000000, 519) → 1926 ...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: 1 Post-solution available
Copyright Nick Parlante 2017 - privacy