Question: Write a program that prompts the user to enter a running pace in minutes and seconds and kilometers per hour and converts it to miles

Write a program that prompts the user to enter a running pace in minutes and seconds and kilometers per hour and converts it to miles per hour. You should use an overloaded function called convertToMPH. The first definition should take two integers (minutes and seconds) and return the speed in MPH as a double. The second definition should take kilometers per hour as a double and return the speed in MPH as a double. HINT: 1 mile is approximately 1.61 kilometers.

Sample: Entertheminutespermileofyourpace:-2 Enterapositivevalue:9 Enterthesecondspermileofyourpace:64 Enteravaluebetween0and59:12 Enteryourpaceinkilometersperhour:18.97 A9:12mileis6.5MPH. 9.0KPHis11.8MPH.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!