Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that calculates how long it will take you to walk x amount of miles. Assume your walking speed is 3.1 miles/hour. The
Write a program that calculates how long it will take you to walk x amount of miles. Assume your walking speed is 3.1 miles/hour. The program should prompt the user to enter the amount of miles to walk and should print out the time it would take in minutes. Both of those values should be float. The program should continue to prompt the user to enter a new amount of miles until the user enters 0. When the user enters the program should quit. You should write and use the function with the prototype given below. You should also use a macro for your walking speed. Name this macro "SPEED". float Estimated_Time_of_Arrival(float miles); //Given: given the amount of miles needed to travel as a float value //Return: Returns the amount of minutes it would take to walk given miles as a float value Write and use this function in your main program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started