Description
- 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>
Explanation & Answer
attached is my answer
Cpp (C++) CODE:
#i...
Review
Review
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basicΒ mathΒ to advanced rocket science!
Similar Content
Related Tags
Harry Potter and the Sorcerers Stone
by J. K. Rowling
Blink
by Malcolm Gladwell
Sounds Like Titanic
by Jessica Chiccehito Hindman
The Handmaids Tale
by Margaret Atwood
How to Win at the Sport of Business
by Mark Cuban
Homo Deus
by Yuval Noah Harari
1984
by George Orwell
Untamed
by Glennon Doyle
A Portrait of the Artist as a Young Man
by James Joyce