Question
DESCRIPTION When an object is falling because of gravity, the following formula can be used to determine the distance the object falls in a specific
DESCRIPTION
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 = 0.5gt2 The variables in the formula are as follows: d is the distance in meters and t is the amount of time, in seconds, that the object has been falling. Near the surface of the Earth, the acceleration due to gravity, g, is 9.80665 m/s2 (meters per second squared).
Declare a named constant for acceleration due to gravitiy to use in the calculateDistance function. Write a function, calculateDistance, that accepts an objects falling time (in seconds) as a parameter. The function should return the distance, in meters, that the object has fallen during that time interval.
C++
Step 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