Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to convert kilometers to miles in java

import java.util.Scanner;

public class Rohit {
    public static void main (String[]args){


		System.out.println("Enter kilometers ");

		Scanner sc = new Scanner(System.in);
        double 	kilometers = sc.nextDouble();

		double miles = kilometers / 1.6;

		System.out.println(miles + " Miles");

    }
    
}
 
PREVIOUS NEXT
Tagged: #convert #kilometers #miles #java
ADD COMMENT
Topic
Name
8+1 =