mmayoub

Ex07, 01.05.2021

May 4th, 2021
477
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // 01.05.2021
  2. import java.util.Scanner;
  3.  
  4. public class Ex07 {
  5.  
  6.     public static void main(String[] args) {
  7.         // TODO Auto-generated method stub
  8.         // 5, 7 , 12 --> 12
  9.         // 8, 4, 6 --> 8
  10.         int a, b, c;
  11.  
  12.         Scanner in = new Scanner(System.in);
  13.         System.out.print("Enter three numbers: ");
  14.         a = in.nextInt();
  15.         b = in.nextInt();
  16.         c = in.nextInt();
  17.  
  18.         if (a > c && a > b) {
  19.             System.out.println("the great number is " + a);
  20.         } else {
  21.             if (b > c && b > a) {
  22.                 System.out.println("the great number is " + b);
  23.             } else {
  24.                 System.out.println("the great number is " + c);
  25.             }
  26.         }
  27.         in.close();
  28.     }
  29.  
  30. }
  31.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×