desislava_topuzakova

04. Inches to Centimeters

Jan 8th, 2022
1,174
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 InchesToCm_04 {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         double inches = Double.parseDouble(scanner.nextLine());
  7.         double cm = inches * 2.54;
  8.         System.out.println(cm);
  9.     }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment