Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static final int[][] numbers = new int[17][1];
- public static void main(String ... args){
- Random rand = new Random();
- for(int i = 0; i < 1000000; i++){
- numbers[rand.nextInt(rand.nextInt(rand.nextInt(15) + 1) + 1)][0]++;
- if(i % 100 == 0)
- System.out.println(i);
- }
- for(int[] ints:numbers){
- System.out.print(((double)ints[0])/1000000+"% \t");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement