about | help | code help+videos | done | prefs |
Write a method named divideBy2 that accepts an integer parameter and returns how many times the number can be divided by 2 without a remainder. For example, the call divideBy2 (128) should return 7 and divideBy2 (1235) should return 0. The call divideBy2 (244) should return 2. divideBy2(128) → 7 divideBy2(1235) → 0 divideBy2(244) → 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: 200
Copyright Nick Parlante 2017 - privacy