CISC 1110 (Science Section)
Professor Langsam
Assignment #1
According to
and its velocity by:
where:
s = distance (meters)
v = velocity
v0 = initial velocity (meters/sec)
t = time (sec)
g = acceleration due to gravity (9.807 meters/sec2).
Write a C++ program that calculates the distance and velocity that an object travels after being dropped off a very tall building. (We will neglect the drag due to air friction.). Assume the object is dropped with an initial velocity of zero. Your program should print a message of the form:
WHEN THE TIME IS _____ SECONDS THE DISTANCE TRAVELED IS ______ METERS
THE VELOCITY IS _____ METERS PER SECOND.
Calculate the above for time = 1, 2, 4, 5, and 10 seconds.
Use the trailer method to signal the end of the data. Be sure to use meaningful variables, comment your program, and use a consistent style.