Neato

+/u/compilebot java

import java.util.*;

class RandomNumberNotes {

public static void main(String[] args) {

    Random rng = new Random();


    int num = rng.nextInt();     //gives a random number between -2^31 through 2^31 - 1

    System.out.println("The random number is: " + num);


    //Let's do a die roll

    //FOR A RANGE OF NUMBERS


    //nextInt(int num) - gives a random number between 0 and num-1 (exclusive on num)

    for (int i = 0; i < 100; i++) {   //for loop for 100 numbers

        int roll = rng.nextInt(6)+1;

        System.out.print(roll + " ");

    }


    //What if I want to roll two dice?

    int twoRolls = rng.nextInt(11)+2;

    System.out.println("\n" + twoRolls);


    //Is he the daddy?

    int possibility = 25;

    int actualNumber = rng.nextInt(101);  //0 through 100

    if (actualNumber <= 25)

    {

        System.out.println("YOU ... ARE ... THE FATHER!");

    } else {

        System.out.println("You are not the father!!!!!!!!!!!!!!!!!! ... <followed by massive moonwalking and yelping and explosions ~ Michael Bay>");

    }


}

}

/r/anthonyfapstothis Thread