CISC 1110 (Science Section)

Brooklyn College

Professor Langsam

 

Assignment #1

 

According to Newton’s Law of Motion the distance traveled by an object moving linearly (that is, in one dimension) with uniform acceleration, can be found by:

 

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.