Question: 4) (10 pts) Write a script that will prompt the user for a distance in miles, and then a 'K' for kilometers or 'M'
4) (10 pts) Write a script that will prompt the user for a distance in miles, and then a 'K' for kilometers or 'M' for meters. The script will convert and print the corresponding distance in the corresponding unit specified by the user. The conversions are: Kilometers = Miles*1.6 Meters Miles*1600 Use two decimal points when displaying numbers. For example, the execution of the script might look like this: >>Enter the distance in miles: 26 >>Do you want to convert to Kilometer (K) or Meter (M)? M >>The distance of 26.00 miles is equal to 41600.00 meters.
Step by Step Solution
There are 3 Steps involved in it
Heres a script that prompts the user for a distance in miles and the desired unit of conversion kilo... View full answer
Get step-by-step solutions from verified subject matter experts
