subject

Your program will calculate the distance an object travels (in meters) on earth for a specified number of seconds. you will also calculate the distance traveled on the moon (in meters) for the specified number of seconds.

your program must have the main function and, at least, the following four additional functions. the signatures for these functions must be as follows:

double readseconds()
double calculateearthdistance(double seconds)
double calculatemoondistance(double seconds)
void displayresults(double seconds, double earthdistance, double moondistance)
the readseconds function will be an input function that will read in a double value from cin and return that value back to main.

the calculateearthdistance function will calculate the distance an object falls (on earth) during the specified number of seconds.

the calculatemoondistance function will calculate the distance an object falls (on the moon) during the specified number of seconds.

the displayresults function that will display the number of seconds an object has fallen as well as the distance the object has fallen on the earth and on the moon.

you can have additional function is needed.

here is a summary of the processing that is required in the various functions:

double readseconds()

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:31
Selling a product through an electronic medium is
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
You know the right answer?
Your program will calculate the distance an object travels (in meters) on earth for a specified numb...
Questions
question
History, 22.02.2021 23:20
question
Mathematics, 22.02.2021 23:20
question
Mathematics, 22.02.2021 23:20
question
Mathematics, 22.02.2021 23:20
question
Biology, 22.02.2021 23:20
question
Social Studies, 22.02.2021 23:20
Questions on the website: 13722367