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= /2 gt? The variables in the formula are as follows: d is the distance in meters, g is 9.8, and t is the amount of time, in seconds, that the object has been falling. Write a function named fallingDistance that accepts an object's falling time (in seconds) as an argument. The function should return the distance, in me that time interval. Write a program that demonstrates the function by prompting the user for the total time and calling the function in a loop that pass increments as the argument and displays the elapsed time and return value. The output should like the output below. INPUT VALIDATION: The time entered by the user should be a number, and it should be greater than 0. Please enter the total falling time: 20 Time Distance 0.00 5.00 10.00 15.00 20.00 userêmimir: ~/csci_10150c_fall_2020/m05_programming_assignment_1 > ./a.out Please enter the total falling time: 23 0.00 122.50 490.00 1102.50 1960.00 rime Distance 0.00 5.00 10.00 15.00 20.00 23.00 0.00 122.50 490.00 1102.50 1960.00 2592.10 Please enter the total falling time: -1 Your time should be greater than 0 Please enter the total falling time: a That is not a number! Please try again. nlease tetal falling tim
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= /2 gt? The variables in the formula are as follows: d is the distance in meters, g is 9.8, and t is the amount of time, in seconds, that the object has been falling. Write a function named fallingDistance that accepts an object's falling time (in seconds) as an argument. The function should return the distance, in me that time interval. Write a program that demonstrates the function by prompting the user for the total time and calling the function in a loop that pass increments as the argument and displays the elapsed time and return value. The output should like the output below. INPUT VALIDATION: The time entered by the user should be a number, and it should be greater than 0. Please enter the total falling time: 20 Time Distance 0.00 5.00 10.00 15.00 20.00 userêmimir: ~/csci_10150c_fall_2020/m05_programming_assignment_1 > ./a.out Please enter the total falling time: 23 0.00 122.50 490.00 1102.50 1960.00 rime Distance 0.00 5.00 10.00 15.00 20.00 23.00 0.00 122.50 490.00 1102.50 1960.00 2592.10 Please enter the total falling time: -1 Your time should be greater than 0 Please enter the total falling time: a That is not a number! Please try again. nlease tetal falling tim
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
c++
falling distance
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education