Advertisement
paganoantonio

Untitled

Apr 8th, 2022
58
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         Scanner scan = new Scanner(System.in);
  2.         System.out.println("inserisci a:");
  3.         int a = scan.nextInt();
  4.         System.out.println("inserisci b:");
  5.         int b = scan.nextInt();
  6.         System.out.println("inserisci c:");
  7.         int c = scan.nextInt();
  8.  
  9.         int max;
  10.         if (a > b && a > c)
  11.             max = a;
  12.         else if (b > a && b > c)
  13.             max = b;
  14.         else
  15.             max = c;
  16.         System.out.println(" il numero più grande è:" + max);
Advertisement
RAW Paste Data Copied
Advertisement