I just want to make a basic counter and for some reason I can't figure out how to draw a random number between 1 and 100. Can someone please explain what I have to do to draw a random number between 1 and 100?
This is what I came up with until now:
int value;
private int count = 1;
Random rand;
}
The function to use is sample() which shuffles the input list, in the example below it shuffles the created list range(1,101) . That is to say, range(1,101) creates a list of numbers 1 to 100. Then the function sample() shuffles that list in random order.
Select the cells in which you want to get the random numbers. In the active cell, enter =RAND() Hold the Control key and Press Enter. Select all the cell (where you have the result of the RAND function) and convert it to values.
Random randomGenerator = new Random();
int randomInt = randomGenerator.nextInt(100);
log("Generated : " + randomInt);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With