Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.  
  5. public static void main(String[] args) {
  6. Scanner in = new Scanner(System.in);
  7. int a = in.nextInt();
  8. int b = in.nextInt();
  9. int c = in.nextInt();
  10. if (-1000 <= a && a <= 1000 && -1000 <= b && b <= 1000 && -1000 <= c && c <= 1000) {
  11.  
  12. if (a >= b && a >= c) {
  13. if (b >= c) {
  14. System.out.printf("%d %d %d", a, b, c);
  15. } else {
  16. System.out.printf("%d %d %d", a, c, b);
  17. }
  18. }
  19. if (b >= a && b >= c) {
  20. if (a >= c) {
  21. System.out.printf("%d %d %d", b, a, c);
  22. } else {
  23. System.out.printf("%d %d %d", b, c, a);
  24. }
  25. }
  26. if (c >= a && c >= b) {
  27. if (b >= a) {
  28. System.out.printf("%d %d %d", c, b, a);
  29. } else {
  30. System.out.printf("%d %d %d", c, a, b);
  31. }
  32. }
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement