Java Program to Convert Kilometers To Miles

Write a Java program to convert kilometers to miles. The formula to convert 1 Mile = 1.6093434 Kilometers.

package Remaining;

import java.util.Scanner;

public class KMToMile {
	
	private static Scanner sc;
	
	public static void main(String[] args) {
		
		sc= new Scanner(System.in);

		System.out.print("Please Enter the Kilometers =  ");
		double kilometer = sc.nextDouble();
		
		double mile = kilometer * 0.621371;
		
		System.out.println("Distance in KiloMeters = " + kilometer + " KiloMeters");
		System.out.println("Distance in Miles      = " + mile + " Miles");
		
	}
}
Java Program to Convert Kilometers To Miles