Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write a C++ only code, this program consists of the use of for-statements please write the complete code, and show that it runs Write a
write a C++ only code, this program consists of the use of for-statements
please write the complete code, and show that it runs
Write a program that calculates velocity, v, and distance, x, given time, t, and acceleration due to gravity, a. The program will print out f, 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: 0.1 Enter the step-size, in seconds: o.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 m x: 0.0078 mm x: 0.0123 nm x: 0.0177 m x: 0.0240 m x: 0.0314 m 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- ataa-accel. due to gravity 9.806 m/sec? round off the output to four decimal places (using setprecision)) the number of steps to take is rounded up for steps with fractional values separate your columns with tabs (i.e. It format escape sequence) 2 -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