Advertisement
paganoantonio

Untitled

Mar 21st, 2022
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. Scanner scan = new Scanner(System.in);
  2.  
  3.         System.out.println("inserire un numero r");
  4.         int r = scan.nextInt();
  5.  
  6.         System.out.println("inserire un numero t");
  7.         int t = scan.nextInt();
  8.  
  9.         System.out.println("inserire un numero p");
  10.         int p = scan.nextInt();
  11.  
  12.         if ((r > t) &&  (r > p))
  13.                 System.out.println(" il numero maggiore è " + r);
  14.  
  15.         if ((t > r) && (t > p))
  16.                 System.out.println(" il numero maggiore è " + t);
  17.  
  18.         if ((p > t) && (p > r))
  19.                 System.out.println(" il numero maggiore è " + p);
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement