Average
Acceleration Program
Average
Acceleration
is a physics concept. It describes the
rate at which velocity changes over time.
You can find average acceleration by knowing velocity and time at two
different times.
For instance, if velocity is 30mph at 1:06pm
and 70mph at 1:09pm, you can find average acceleration.
To find average
acceleration, you divide change in velocity by change in time.
40 / 3 =
13.33333mph / min
Assignment: Write a program in which you:
Declare the following variables as INT type:
Initialize all variables to zero.
(See the code list 3-1 on pg. 33 of your text for an example of
declaring and initializing a variable.
An example was also given in Lesson 2 notes.)
Use the cout
statement to describe the concept of average acceleration to the user.
Print the blue text from above on your output screen using appropriate
line breaks.
Use prompt / cin method to acquire variable values from the user
(standard input or keyboard) for: t1, t2, v1, and v2.
Show your variable values on the screen, including the values for deltaV, deltaT, and aa which have not yet been
calculated.
When complete, you
program should resemble the following (Numbers in red are entered by user):
Average Acceleration is a physics
concept. It describes the rate at which
velocity changes over time. You can find
average acceleration by knowing velocity and time at two different times.
Enter the first time (in minutes):
55
Enter the second time (in minutes): 58
Enter the first velocity (in mph):
40
Enter the second velocity (in mph): 100
You entered the following information:
Time 1 = 55
Time 2 = 58
Velocity 1 = 40
Velocity 2 = 100
Calculations:
Change in Velocity = 0
Change in Time = 0
Average Acceleration = 0
Create a folder called physics. When complete, compile the program, save, and
re-compile to create EXE.
Do yourself a favor and start from scratch. If you can complete this assignment with
little difficulty, you should be able to get at least a ‘D’ on the upcoming
quiz.