i need a help for my home works | Cheap Nursing Papers

i need a help for my home works

  • For this project, upload 2 files:1 your source file in rebounds.cpp2 your text file generated (HeightReached.txt)Submit both files at the same time.

EEGR 161 Fall 2017

Project 3

When a ball falls from an initial height h, its speed s when it reaches the floor is given by the relation:

= √2 ∗ h ∗ g where g is the gravity constant 9.81. Immediately after hitting the floor, its speed

becomes s1 = eps*s (where eps is a constant and s its speed before rebounding). The ball will then reach

the height ℎ1 = ( 1)2 /(2 ∗ ) = ( ∗ )2 /(2 ∗ ). After n rebounds, what is the equation of the

height reached by the ball?

Write a program (rebounding.cpp) that computes the height reached by the ball after 1, 2, …, n rebounds

and save the data in file called HeightReached.txt. Print a statement before the height reached.

Your program should define the constant g

Your program should request from the user:

– h0 (the initial height)

– eps (the rebound coefficient, 0< eps <1)

– n (the number of rebounds, 0<= n)

For h0 = 25, eps = 0.9, and n = 10, the height obtained should be around 3.04

 To use sqrt() function you will need to #include <cmath>

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp