You just got hired as a programmer at the Stimsonian Institute of Physics. One infamous educational activity at the Stimsonian Institute is taking high school students to an isolated bridge and throwing watermelons off the bridge and timing their landings. The problem this year is that major calculator manufacturer Tennessee Instruments went bankrupt and so no student has a TI-42 to do the physics calculations. You have been asked to write a program that can do the physics calculations for the students.
We know from physics that an object in free fall can be modeled using the following equation:
xf = 4.9t2 + v0t + x0
, where t is the time in seconds the object has been falling, v0 is the starting velocity, and x0 is the starting height in meters. Write a program that asks for all these variables and solves for xf.
Another thing the students calculate is the impact velocity, which is given by this equation:
vf = 9.8t + v0
Extent your program to solve for vf.
Part I is worth 10 points. Part II is worth 12 points (Part I + 2 points extra credit). The lab is out of 10 points. When you're done, submit your lab02.cpp file on Blackboard. I will be grading your program on the following criteria:
![[Dilbert]](dilbert.gif)