Advertisement
Guest User

Untitled

a guest
Jun 14th, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.08 KB | None | 0 0
  1. public static void main(String[] args) {
  2.  
  3.         Scanner scanner = new Scanner(System.in);
  4.  
  5.         int a = Integer.parseInt(scanner.nextLine());
  6.         int b = Integer.parseInt(scanner.nextLine());
  7.         int c = Integer.parseInt(scanner.nextLine());
  8.  
  9.         if (a > b) {
  10.             if (a > c) {
  11.                 System.out.println("A is the biggest!");
  12.             } else if (a < c) {
  13.                 System.out.println("C is the biggest!");
  14.             } else {
  15.                 System.out.println("A and C are the biggest!");
  16.             }
  17.         }
  18.         if (a < b) {
  19.             if (b > c) {
  20.                 System.out.println("B is the biggest!");
  21.             } else if (b < c) {
  22.                 System.out.println("C is the biggest");
  23.             } else {
  24.  
  25.                 System.out.println("B and C are the biggest");
  26.             }
  27.         }
  28.         if (a == b) {
  29.             if (a == c) {
  30.                 System.out.println("AllL are equal");
  31.  
  32.             } else {
  33.                 System.out.println("A and B are the biggest");
  34.             }
  35.         }
  36.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement