Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class asd {
- public static void main(String[] args)
- {
- int[] array = new int[9];
- for (int i = 0; i < array.length; i++) {
- array[i] = (int) Math.round((Math.random() * 30) - 15);
- }
- for (int i = 1; i< 6; i++) {
- Arrays.sort(array);
- int max = array[array.length - i];
- System.out.println(max);
- }
- }}
Advertisement
Add Comment
Please, Sign In to add comment