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, 22.06.2019 02:00
The word ‘play’ comes with many different interpretations and a variety of definitions. discuss some of the various meanings tied to the word play. why is the concept of play thought to be an important addition to the workplace? do some (brief) research online and give an example of how play in the workplace is being done right.
Answers: 2
question
Computers and Technology, 22.06.2019 04:00
Chloe is building a kiosk-based excel application. she wants to make some modifications to the screen elements in order to keep users from being distracted by parts of the application that are irrelevant to her application. she turns to henry for guidance as she knows he built a similar solution earlier this year.chloe has decided to hide the worksheet gridlines and the vertical scroll bar. what does henry tell her to use to do this? a) screen elements dialog boxb) display options dialog boxc) customization dialog boxd) excel options dialog box
Answers: 2
question
Computers and Technology, 22.06.2019 21:40
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
question
Computers and Technology, 23.06.2019 17:20
What is the best assassins creed game?
Answers: 2
You know the right answer?
Your program will calculate the distance an object travels (in meters) on earth for a specified numb...
Questions
question
Mathematics, 30.04.2021 19:00
question
Mathematics, 30.04.2021 19:00
question
Spanish, 30.04.2021 19:00
question
Mathematics, 30.04.2021 19:00
Questions on the website: 13722367