Answers for "how to convert kilometers to miles in java"

0

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");

    }
    
}
Posted by: Guest on April-10-2022

Code answers related to "how to convert kilometers to miles in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language