Advertisement
desislava_topuzakova

02. Inches to Centimeters

Apr 22nd, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.29 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class FromInchToCm {
  4.     public static void main(String[] args) {
  5.  
  6.         Scanner scanner = new Scanner (System.in);
  7.         double inches = Double.parseDouble(scanner.nextLine());
  8.         double cm = inches * 2.54;
  9.         System.out.println(cm);
  10.  
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement