Question: In this assignment, you will write a C + + program that performs some basic physics calculations. You will prompt the user for the number
In this assignment, you will write a C program that performs some basic physics calculations. You will prompt the user for the number of seconds an object has been falling. You will then calculate the distance it has traveled in that time, and how fast it is moving. You will output these results.
Input specification
The program should prompt the user to enter the name of the object and the number of seconds an object has been falling. This should be a floating point number.
The program's formatting should appear exactly as shown in the sample interaction.
Output specification
After obtaining the number of seconds and performing the calculations, the program should display the results for each result: distance traveled and speed. The program's formatting should appear exactly as shown in the sample interaction.
User interaction specifications
The program should display a welcome message to the user.
Prompt the user to enter the name of the object.
Prompt the user to enter the number of seconds an object has been falling.
Calculate the results for distance traveled and instantaneous speed by using the following formulas:
Distance Traveled
Instantaneous Speed
Use the value of for the value of You should set this as a constant.
Display the results in the format shown in the sample interaction below.
Sample interaction
$ g $CXXFLAGS pabcpp pab
$ pab
Welcome to the Falling Object Calculator!
What object is falling: ball
Enter the number of seconds the object has been falling:
In seconds, the ball has fallen: meters The ball is traveling at a speed of: meters per second $
Note: The $ character represents your shell prompt and should not be printed by your program.
Specific program requirements
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
