Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class Main {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int numA = Integer.parseInt(sc.nextLine());
- int numB = Integer.parseInt(sc.nextLine());
- int numC = Integer.parseInt(sc.nextLine());
- if (numA >= numB && numB >= numC) {
- System.out.printf("%d%n%d%n%d", numA, numB, numC);
- } else if (numA >= numC && numC >= numB) {
- System.out.printf("%d%n%d%n%d", numA, numC, numB);
- } else if (numB >= numA && numA >= numC) {
- System.out.printf("%d%n%d%n%d", numB, numA, numC);
- } else if (numB >= numC && numC >= numA) {
- System.out.printf("%d%n%d%n%d", numB, numC, numA);
- } else if (numC >= numB && numB >= numA) {
- System.out.printf("%d%n%d%n%d", numC, numB, numA);
- } else if (numC >= numA && numA >= numB) {
- System.out.printf("%d%n%d%n%d", numC, numA, numB);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement