// Name: Dylan McDonald // Class and Section: CS 54, Section // Date: 4 September, 2007 // Purpose: Calculate physics equations for Stimson's AP Physics Students #include using namespace std; int main() { const double GRAVITY = 9.80665; double airTime, initDisplacement, initVelocity, finalDisplacement, finalVelocity; // ask for user input cout << "Time in Air (s): "; cin >> airTime; cout << "Starting Velocity (m / s): "; cin >> initVelocity; cout << "Starting Displacement (m): "; cin >> initDisplacement; // find the displacement using the Part I equation finalDisplacement = (GRAVITY / 2.0 * airTime * airTime) + (initVelocity * airTime) + initDisplacement; cout << "The watermelon fell " << finalDisplacement << " m." << endl; // find the velocity using the Part II equation finalVelocity = (GRAVITY * airTime) + initVelocity; cout << "The watermelon hit the ground at " << finalVelocity << " m / s." << endl; return 0; }