Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class MilestoKilometers
- {
- public static void main(String[] args)
- {
- int meters;
- float Kilometers;
- Scanner scan = new Scanner(System.in) ;
- // get the Miles from the user
- System.out.println("Please Input your Miles and i will conver them to Kilometers");
- Scanner input= new Scanner(System.in);
- meters=input.nextInt();
- //compute the Kilometers
- Kilometers= (float) ((meters) *1.60936);
- //print the average
- System.out.println("The Kilometers are: "+Kilometers);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement