Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ format. PLEASE FOLLOW the starter code and instruction. first image- instruction second image- starter code third image- visual how the output should be ill

c++ format. PLEASE FOLLOW the starter code and instruction.
first image- instruction
second image- starter code
third image- visual how the output should be
ill like upon completion image text in transcribed
image text in transcribed
image text in transcribed
When an object is falling because of gravity, the following formula can be used to determine the distance the object falls in a specific time period: d = gt The variables in the formula are as follows: d is the distance in meters, g is 9.8 (this should be a constant variable in your program), and t is the amount of time, in seconds, that the object has been falling. Write a function named falling Distance that accepts an object's falling time (in seconds) as an argument. The function should return the distance, in meters, that the object has fallen during that time interval. Write a program that demonstrates the function by calling it in a loop that passes the values 1 through 10 as arguments, and displays the return value. 1 77 Chapter 6, Programming Challenge 5: Falling Distance 2 // 3 77 Name: 4 // Date: 5 77 6 7 // Provide the needed header files HERE !!!!!! 8 using namespace std; 9 10 // Function prototype 11 double fallingDistance(int); 12 13 int main() 14 { // Set the numeric output formatting. 17 // Set the preciesion to 2 with fixed and showpoint 18 19 // Display the seconds and distance: 20 21 return 0; 15 16 22 } 23 24 //**** 25 // The fallingDistance function returns the 26 // distance that a falling object falls. The time * 27 // parameter is the number of seconds the object 28 // fell. 29 //**** 30 31 1 In 1 second(s), the object has fallen 4.90 meters 2 In 2 second(s), the object has fallen 19.60 meters 3 In 3 second(s), the object has fallen 44.10 meters 4 In 4 second(s), the object has fallen 78.40 meters 5 In 5 second(s), the object has fallen 122.50 meters 6 In 6 second(s), the object has fallen 176.40 meters 7 In 7 second(s), the object has fallen 240.10 meters 8 In 8 second(s), the object has fallen 313.60 meters 9 In 9 second(s), the object has fallen 396.90 meters 10 In 10 second(s), the object has fallen 490.00 meters 11

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems Uropean Conference Adbis 2020 Lyon France August 25 27 2020 Proceedings Lncs 12245

Authors: Jerome Darmont ,Boris Novikov ,Robert Wrembel

1st Edition

3030548317, 978-3030548315

More Books

Students also viewed these Databases questions

Question

Define Management or What is Management?

Answered: 1 week ago

Question

What do you understand by MBO?

Answered: 1 week ago

Question

What is meant by planning or define planning?

Answered: 1 week ago

Question

Define span of management or define span of control ?

Answered: 1 week ago

Question

2. What should an employer do when facing an OSHA inspection?

Answered: 1 week ago