Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int num = Integer.parseInt(scanner.nextLine());
- String textIn = scanner.nextLine();
- String textOut = scanner.nextLine();
- double m = 1;
- double cm = m / 1000;
- double mi = m / 0.000621371192;
- double in = m / 39.3700787;
- double km = m / 0.001;
- double ft = m / 3.2808399;
- double yd = m / 1.0936133;
- if (textIn.equals(cm) && textOut.equals(mi)) {
- double result = num * (cm * mi);
- System.out.printf("%.8f", result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement