id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > aaa1bounceBall
prev  |  next  |  chance

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)

public int aaa1bounceBall(int startHeight) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 230

Copyright Nick Parlante 2017 - privacy