All pastes #358628 Raw Edit

Mine

public text v1 · immutable
·published 2007-02-16 10:08 UTC
rendered paste body
//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 <iostream>
#include <iomanip>
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 << ""<<mark<<"";
        }
       time = time+1;
       cout << "\n";
      }
     height = (height*(3/4));

    }

  }
  else{
    cout << " Invalid Input! \n";
  }
  cout << "\n";
  return 0;
}