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
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