Question: Using C++, write a program that calculates the distance an object travels (in meters) on Earth for a specified number of seconds. Requirements: I just

Using C++, write a program that calculates the distance an object travels (in meters) on Earth for a specified number of seconds.

Requirements:

Using C++, write a program that calculates the distance an object travels(in meters) on Earth for a specified number of seconds. Requirements: Ijust need the code. C++ requirements You are not allowed to useany global variables. Use of global variables will result in a gradeof zero for part Make sure you exactly match any function signatures

I just need the code.

C++ requirements You are not allowed to use any global variables. Use of global variables will result in a grade of zero for part Make sure you exactly match any function signatures that are required by the exercise. The function signatures are: double readSeconds) double calculateDistance (double seconds) void displayResults (double seconds, double distance) The program must use type double for calculations Failure to follow the C++ requirements could reduce the points received from passing the tests General overview Your program will calculate the distance an object travels (in meters) on Earth for a specified number of seconds. Your program must have the main function and three additional functions. The signatures for these functions must be as follows double readSeconds) double calculateDistance (double seconds) void displayResults (double seconds, double distance) The readSeconds function will be an input function that will read in a double value from cin and return that value back to main ThecalculateDistance function will calculate the distance an object falls (on earth) during the specified number of seconds. The displayResults function that will display both the number of seconds an object has fallen as well as the distance the object has fallen. C++ requirements You are not allowed to use any global variables. Use of global variables will result in a grade of zero for part Make sure you exactly match any function signatures that are required by the exercise. The function signatures are: double readSeconds) double calculateDistance (double seconds) void displayResults (double seconds, double distance) The program must use type double for calculations Failure to follow the C++ requirements could reduce the points received from passing the tests General overview Your program will calculate the distance an object travels (in meters) on Earth for a specified number of seconds. Your program must have the main function and three additional functions. The signatures for these functions must be as follows double readSeconds) double calculateDistance (double seconds) void displayResults (double seconds, double distance) The readSeconds function will be an input function that will read in a double value from cin and return that value back to main ThecalculateDistance function will calculate the distance an object falls (on earth) during the specified number of seconds. The displayResults function that will display both the number of seconds an object has fallen as well as the distance the object has fallen

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!