← Back
Code Challenge 3 - Miles to Kilometers Calculator
Introduction
Unit conversion programs are great for practicing elementary programming concepts. This first calculator program is converting distances from miles to kilometers.
Skills to Practice
- Prompting a user for input
- Saving user input to variables
- Formatting custom output using variables
Challenge Tasks
- Create a console project named CodeChallenge3MiToKm.
- Complete the folowing tasks:
- Prompt the user to enter a value to represent miles.
- Convert the miles value to kilometers. If you don’t know the math formula, search it!
- Output a message to display the original miles unit and the equivalent value in kilometers.
Sample Output