subject

5.9 LAB: User-Defined Functions: Step counter 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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Imagine that you have a friend who is starting a small business and is interested in using social media to spread the word. he is not certain that it is a good move, and has come to you for . would you advise him to use social media to advertise his business? why or why not? support you answer with information from the text.
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
What is a distinguishing feature of today’s graphic application software?) graphic applications are used today on a variety of devices, including touch-screen kiosks and mobile phones.
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
Martha is designing a single-player game. her manager suggests that she plan the design to incorporate future modifications. which principle of game design relates to planning for future modifications?
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Into what form does the barcode reader convert individual bar patterns?
Answers: 1
You know the right answer?
5.9 LAB: User-Defined Functions: Step counter A pedometer treats walking 2,000 steps as walking 1 mi...
Questions
question
Mathematics, 10.12.2020 01:00
question
Mathematics, 10.12.2020 01:00
question
Mathematics, 10.12.2020 01:00
Questions on the website: 13722363