Advertisement
jwrbg

asd

Jan 18th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. public static void main(String[] args) {
  2.         Scanner scanner = new Scanner(System.in);
  3.         int num = Integer.parseInt(scanner.nextLine());
  4.         String textIn = scanner.nextLine();
  5.         String textOut = scanner.nextLine();
  6.  
  7.         double m = 1;
  8.         double cm = m / 1000;
  9.         double mi = m / 0.000621371192;
  10.         double in = m / 39.3700787;
  11.         double km = m / 0.001;
  12.         double ft = m / 3.2808399;
  13.         double yd = m / 1.0936133;
  14.  
  15.  
  16.  
  17.         if (textIn.equals(cm) && textOut.equals(mi)) {
  18.  
  19.             double result = num * (cm * mi);
  20.             System.out.printf("%.8f", result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement