Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Bingo{
- public static Random r = new Random();
- public static int getRandomNumber(int min, int max){
- return min + r.nextInt(max-min);
- }
- public static void main (String args[]) throws Exception{
- for ( int i = 0 ; i < 10 ; i = i+0 ){
- int num = getRandomNumber(50,100);
- writeLine(num);
- boolean hit = false;
- int c = 0;
- while (r.nextInt(5) != 1 && c < 1000) {
- c++;
- }
- if (c < 1000) {
- hit = true;
- }
- Thread.sleep(100);
- }
- }
- public static void writeLine(String s){
- System.out.println(s);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement