Question: For this task you are asked to write another conversion program: this time, converting miles to kilometres. The program should begin by asking the user
For this task you are asked to write another conversion program: this time, converting miles to kilometres.
The program should begin by asking the user "How many miles?", and then allow the user to enter the number of miles followed by enter directly after the message.
The program should then display the miles converted to kilometres, in the format "{Distance in miles here} miles is equal to {distance in kilometres here} kilometres".
The program should then print a message to prompt the user to "Press the enter key to exit."
1 mile = 1.609344 kilometres
Sample code:
using System; namespace SimpleLengthConversion { public class MilesToKm { public static void Main() { // You aren't provided with any example code for this exercise // Your task is to write this program from scratch } } } Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
