Problem 2: When a particular rubber ball is dropped from a given height (in meters), its impact speed (in meters/second) when it hits the ground is given by the formula: \[ \text { speed } S=\sqrt{2 g h} \] where $g$ is the acceleration due to gravity and $h$ is the height. The ball then rebounds to program that will accept input values from the user at run time and display the impact speed of the first three bounces and the rebound height of each bounce. Test your program using an initial height of $18 \mathrm{~m}$. Run your program twice, and compare the results for dropping the ball on Earth $\left(g=9.81 \mathrm{~m} / \mathrm{s}^{2}\right)$ and on the Moon $\left(g=1.67 \mathrm{~m} / \mathrm{s}^{2}\right)$. [Hint: In Step 2: Design a solution, use a Table to organize the solution before going to Step 3: Coding] Save this program as Module3Proj2.

Public Answer

2HX9X9 The First Answerer