Welcome to Westonci.ca, where you can find answers to all your questions from a community of experienced professionals. Discover detailed solutions to your questions from a wide network of experts on our comprehensive Q&A platform. Experience the ease of finding precise answers to your questions from a knowledgeable community of experts.

A pedometer treats walking 2,000 steps as walking 1 mile. Define a function named StepsToMiles that takes an integer as a parameter, representing the number of steps, and returns a float that represents the number of miles walked. Then, write a main program that reads the number of steps as an input, calls function StepsToMiles() with the input as an argument, and outputs the miles walked.

Output the result with four digits after the decimal point, which can be achieved as follows:
Put result to output with 4 decimal places

If the input of the program is:

5345
the function returns and the output of the program is:

2.6725
Your program should define and call a function:
Function StepsToMiles(integer userSteps) returns float numMiles


Sagot :

We hope our answers were useful. Return anytime for more information and answers to any other questions you have. Thanks for stopping by. We strive to provide the best answers for all your questions. See you again soon. We're here to help at Westonci.ca. Keep visiting for the best answers to your questions.