Advertisement
finderabc

Test

Jun 7th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.75 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class TEST {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         String posokaOvca1 = scanner.nextLine();
  7.         String posokaOvca2 = scanner.nextLine();
  8.         String posokaKrokodil = scanner.nextLine();
  9.         String colorOvca1 = scanner.nextLine();
  10.         String colorOvca2 = scanner.nextLine();
  11.         String colorKrokodil = scanner.nextLine();
  12.         double priceKgAsfalt = 0;
  13.  
  14.  
  15.         if (posokaOvca1.equals("left") && colorOvca2.equals("green")) {
  16.             if (colorKrokodil.equals("white")) {
  17.                 priceKgAsfalt = Double.parseDouble(scanner.nextLine());
  18.             }
  19.         }
  20.         System.out.println(priceKgAsfalt);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement