Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Expressions {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int a = scanner.nextInt();
- int b = scanner.nextInt();
- int c = scanner.nextInt();
- sortNums(a,b,c);
- }
- public static void sortNums(int a, int b, int c) {
- int temp = a + b + c;
- int min = Math.min(Math.min(a, b), c);
- int max = Math.max(Math.max(a, b), c);
- int res = temp - (min + max);
- System.out.println(max + " " + res + " " + min);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement