Skip to content

Instantly share code, notes, and snippets.

@mojaie
Created December 5, 2011 07:47
Show Gist options
  • Save mojaie/1432753 to your computer and use it in GitHub Desktop.
Save mojaie/1432753 to your computer and use it in GitHub Desktop.
AOJ:0018
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int[] arr = new int[5];
arr[0] = scn.nextInt();
arr[1] = scn.nextInt();
arr[2] = scn.nextInt();
arr[3] = scn.nextInt();
arr[4] = scn.nextInt();
Arrays.sort(arr);
System.out.println(arr[4] + " " + arr[3] + " " + arr[2] + " "
+ arr[1] + " " + arr[0]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment