Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please complete code in C++ only. show that it debugs. and show that it debugs with the numbers provided Write a program that calculates velocity,
please complete code in C++ only. show that it debugs. and show that it debugs with the numbers provided
Write a program that calculates velocity, v, and distance, x, given time, t, and acceleration due to gravity, a. The program will print out t, x, and v for each time point in tabular form. The program should prompt for total time (in seconds), and step- size (in seconds) for the calculations, and print out the table of results. An example run: Enter the time, in seconds:. 1 Enter the step-size, in seconds: 0.01 t: 0.0000 sec t: 0.0100 sec t: 0.0200 sec t: 0.0300 sec t: 0.0400 sec t: 0.0500 sec t: 0.0600 sec t: 0.0700 sec t: 0.0800 sec t: 0.0900 sec t: 0.1000 sec x: 0.0000 m x: 0.0005 m x: 0.0020 m x: 0.0044 mm x: 0.0078 nm x: 0.0123 m x: 0.0177 m x: 0.0240 m x: 0.0314 nm x: 0.0397 m x: 0.0490 m v: 0.0000 m/s v: 0.0981 m/s v: 0.1961 m/s v: 0.2942 m/s v: 0.3922 m/s v: 0.4903 m/s v: 0.5884 m/s v: 0.6864 m/s v: 0.7845 m/s v: 0.8825 m/s v: 0.9806 m/s The needed equations and constant are: v- atata-accel. due to gravity -9.806 m/sec round off the output to four decimal places (using setprecision ()) use theStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started