//Name: Assingment 2 //Author: Sir Jarrad Astren //Purpose: To develop a program that draws (approximately) the falling part of the trajectory // of a bouncing ball //Last Updated: February 16 2007 --> 2:38 AM //Additional Notes: I spent copious amounts of time working this program and could never get it to work properly. // Out of my frustration and hope to be able to sleep at all, i gave up. #include #include using namespace std; const double upper = 80.0; const int end = 1; const double lower = 0; const char mark = '-'; const double gravity = 9.81; int main (){ int time; int height; double bounceHeight; double dash; cout << "Please enter the initial height\n"; cin >> height; if (height > lower && height < upper){ cout << " 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80\n"; while (height > end){ time = 0; for (dash = height; dash = (dash-(gravity*(time*time)/2)); dash > end){ for (dash = dash; dash > end; --dash){ cout << ""<