Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. package miriana;
  2.  
  3. import java.util.Scanner;
  4. public class OrdinaTreValori {
  5.  
  6. public static void main(String[] args) {
  7. Scanner input= new Scanner (System.in);
  8. System.out.println("Inserisci tre valori: ");
  9.  
  10. int uno, due, tre;
  11.  
  12. uno = input.nextInt();
  13. due = input.nextInt();
  14. tre= input.nextInt();
  15.  
  16. if (uno>due && uno>tre)
  17. System.out.println("Risultato: " +due+tre+uno);
  18. else if (due>uno && due>tre)
  19. System.out.println("Risultato: " +uno+tre+due);
  20. else if (tre>uno && tre>due)
  21. System.out.println("Risultato: " +uno+due+tre);
  22.  
  23.  
  24. }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement