about | help | code help+videos | done | prefs |
Write a method that returns the "bounce height" of a ball. When a special type of ball is dropped from startHeight it bounces to half the bounce height, rounded DOWN to the next lower integer. So a start height of 10 has a bounce height of 5. A start height of 5 has a bounce height of 2 (half of 5 is 2.5 rounded down to the next lower integer is 2) aaa1bounceBall(50) → 25 aaa1bounceBall(30) → 15 aaa1bounceBall(80) → 40 ...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