Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. public class Solution
  2. {
  3.     public static void main(String[] args) throws Exception
  4.     {
  5.         BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
  6.         int[] array = new int[30];
  7.         for (int i = 0; i < 30; i++)
  8.         {
  9.             array[i] = Integer.parseInt(reader.readLine());
  10.         }
  11.  
  12.         sort(array);
  13.  
  14.         System.out.println(array[9]);
  15.         System.out.println(array[10]);
  16.     }
  17.  
  18.     public static void sort(int[] array)
  19.     {
  20.         Arrays.sort(array);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement