Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

miles to km converter programm in java

import java.util.Scanner;



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

      Scanner sc = new Scanner(System.in);
      System.out.println("Enter the Distance in Miles: ");
      float miles = sc.nextFloat();

      float km = (float)(1.609344 * miles);  
      System.out.println(km);

    }
}
 
PREVIOUS NEXT
Tagged: #miles #km #converter #programm #java
ADD COMMENT
Topic
Name
9+7 =