Question

Project 3 When a ball falls from an initial height h, its speedswhen it reaches the floor is given by the relation: s V2 h g where g is the gravity constant 9.81 Immediately after hitting the floor, its speed becomes sl epss (where eps is a constant and sits speed before rebounding). The ball will then reach the height hl (s1)2/22. g) (s. eps)2/C2.g). After n rebounds, what is the equation of the height reached by the ball? Write a program (rebounding cpp) that computes the height reached the ball after rebound l, 2,...,n rebounds. Print a statement before the height reached. Your program should define the constant g Your program should request from the user ho (the initial height) eps (the rebound coefficient, 0 eps<1) n (the number of rebounds, 0c n) For ho 25, eps 09, and n 10, the height obtained should be around 3.04 To use sqrt0 function you will need to include <cmath
0 0
Add a comment Improve this question Transcribed image text
Answer #1

rebounding.cpp

#include <bits/stdc++.h>
#include <math.h>
using namespace std;

int main()
{
   float h,e;
   float g = 9.8;
   int n;
   cout << "Enter initial height h in meters\n";
   cin >> h;
   cout << "Enter Coefficient of restitution\n";
   cin >> e;
   cout << "Enter number of rounds n\n";
   cin >> n;
   int i = 1;

   while(i<=n)
   {
       float s = sqrt(2*g*h);
       h = (e*s)*(e*s)/(2*g);
       cout << "After " << i << " Rebounds, height reached by ball: " << h << endl ;
       i++;
   }
   return 0;
}

Sample Output:

Enter initial height h in meters
25
Enter Coefficient of restitution
0.9
Enter number of rounds n
10
After 1 Rebounds, height reached by ball: 20.25
After 2 Rebounds, height reached by ball: 16.4025
After 3 Rebounds, height reached by ball: 13.286
After 4 Rebounds, height reached by ball: 10.7617
After 5 Rebounds, height reached by ball: 8.71696
After 6 Rebounds, height reached by ball: 7.06074
After 7 Rebounds, height reached by ball: 5.7192
After 8 Rebounds, height reached by ball: 4.63255
After 9 Rebounds, height reached by ball: 3.75236
After 10 Rebounds, height reached by ball: 3.03942

Add a comment
Know the answer?
Add Answer to:
When a ball falls from an initial height h, its speed s when it reaches the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A red ball is thrown down with an initial speed of 1.2 m/s from a height...

    A red ball is thrown down with an initial speed of 1.2 m/s from a height of 25 meters above the ground. Then, 0.6 seconds after the red ball is thrown, a blue ball is thrown upward with an initial speed of 23.8 m/s, from a height of 0.8 meters above the ground. The force of gravity due to the earth results in the balls each having a constant downward acceleration of 9.81 m/s^2. 1)What is the speed of the...

  • A red ball is thrown down with an initial speed of 1.2 m/s from a height...

    A red ball is thrown down with an initial speed of 1.2 m/s from a height of 26 meters above the ground. Then, 0.4 seconds after the red ball is thrown, a blue ball is thrown upward with an initial speed of 23.8 m/s, from a height of 1 meters above the ground. The force of gravity due to the earth results in the balls each having a constant downward acceleration of 9.81 m/s2. 1) What is the speed of...

  • A red ball is thrown down with an initial speed of 1.3 m/s from a height...

    A red ball is thrown down with an initial speed of 1.3 m/s from a height of 26 meters above the ground. Then, 0.4 seconds after the red ball is thrown, a blue ball is thrown upward with an initial speed of 23.9 m/s, from a height of 1 meters above the ground. The force of gravity due to the earth results in the balls each having a constant downward acceleration of 9.81 m/s2. What is the speed of the...

  • A blue ball is thrown upward with an initial speed of 23.9 m/s, from a height...

    A blue ball is thrown upward with an initial speed of 23.9 m/s, from a height of 0.5 meters above the ground. 2.9 seconds after the blue ball is thrown, a red ball is thrown down with an initial speed of 7.5 m/s from a height of 31.5 meters above the ground. The force of gravity due to the earth results in the balls each having a constant downward acceleration of 9.81 m/s^2. How long after the blue ball is...

  • A blue ball is thrown upward with an initial speed of 24.1 m/s, from a height...

    A blue ball is thrown upward with an initial speed of 24.1 m/s, from a height of 0.8 meters above the ground. 2.9 seconds after the blue ball is thrown, a red ball is thrown down with an initial speed of 10.4 m/s from a height of 31.4 meters above the ground. The force of gravity due to the earth results in the balls each having a constant downward acceleration of 9.81 m/s2. What is the height of the red...

  • A blue ball is thrown upward with an initial speed of 20 m/s, from a height...

    A blue ball is thrown upward with an initial speed of 20 m/s, from a height of 0.8 meters above the ground. 2.4 seconds after the blue ball is thrown, a red ball is thrown down with an initial speed of 5.3 m/s from a height of 22.4 meters above the ground. The force of gravity due to the earth results in the balls each having a constant downward acceleration of 9.81 m/s2. 1) How long after the blue ball...

  • A blue ball is thrown upward with an initial speed of 22.8 m/s, from a height...

    A blue ball is thrown upward with an initial speed of 22.8 m/s, from a height of 0.6 meters above the ground. 2.8 seconds after the blue ball is thrown, a red ball is thrown down with an initial speed of 7.7 m/s from a height of 28.2 meters above the ground. The force of gravity due to the earth results in the balls each having a constant downward acceleration of 9.81 m/s2. ) What is the speed of the...

  • Two throw A blue ball is thrown upward with an initial speed of 22.2 m/s, from...

    Two throw A blue ball is thrown upward with an initial speed of 22.2 m/s, from a height of 0.8 meters above the ground. 2.7 seconds after the blue ball is thrown, a red ball is thrown down with an initial speed of 9.2 m/s from a height of 27.8 meters above the ground. The force of grandly due to the earth results in the balls each having a constant downward acceleration of 9.81 m/s^2. What is the speed of...

  • You throw a ball upward with an initial speed of 3.0 m/s from an initial height...

    You throw a ball upward with an initial speed of 3.0 m/s from an initial height of 1.5 m. After you throw the ball, its acceleration is 9.81 m/s2 downward. Taking upward to be the positive direction, write the position-time equation for the ball's motion. Express your answer in terms of t. t is expressed in seconds.

  • (a) A ball is dropped from rest from an initial height h above the floor. It...

    (a) A ball is dropped from rest from an initial height h above the floor. It then bounces several times. Draw graphs the position y(e), velocity v, (e) and acceleration ay () of the ball for two complete bounces (hitting the ground t for py Ct) ay (t) (b) If the ball is released from rest at a height h the ground? 1.50 m above the floor, how fast is the ball moving when it reach (c) If the ball...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT