Exercise 6: Miles to Kilometers You are making plans to visit Quebec and need to figure out
Question:
Exercise 6: Miles to Kilometers
You are making plans to visit Quebec and need to figure out howmany Kilometers you need to travel.
Create a program that will ask the user for the number of milesthey need to travel. The program will then convert those miles tokilometers. There are 1.609344 miles to every kilometer. Theprogram needs to output the number of kilometers.
The input prompt for this program is pretty simple. It is:
Miles:__
Where the two underscores represent blank spaces
The output is also very simple:
Kilometers:__
Where the two underscores represent blank spaces
When running, using 15 for miles your program will look like thefollowing:
Miles: 15Kilometers: 24.14016
Your program will run twice. The first test will use 15 formiles. The second test will use different data.
Because this program requires input, the Try It button will notwork. To test your code before Codio grades it, click on the CodeVisualizer link below.
Code Visualizer
If your code is running correctly, you can click on the CheckIt! button to grade your work.