repl.it
Java

No description

fork
loading
Files
  • Main.java
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import java.util.Random;
import java.util.concurrent.TimeUnit;

class Main {
  static Random rand = new Random();
  public static void main(String[] args) {
    System.out.println("Start picking numbers");
    time(2000);
    int first = rand.nextInt(50) + 1;
    System.out.println("Your first number is : "+first);
    time(2000);
    int second = rand.nextInt(50) + 1;
    System.out.println("Your second number is : "+second);
    time(2000);
    int third = rand.nextInt(50) + 1;
    System.out.println("Your third number is : "+third);
    time(2000);
    int fourth = rand.nextInt(50) + 1;
    System.out.println("Your fourth number is : "+fourth);
    time(2000);
    int fifth = rand.nextInt(50) + 1;
    System.out.println("Your fifth number is : "+fifth);
    time(2000);
    int luck1 = rand.nextInt(12) + 1;
    System.out.println("And your first lucky star is : "+luck1);
    int luck2 = rand.nextInt(12) + 1;
    System.out.println("And your second lucky star is : "+luck2);
  }

  public static void time(int x){
    try 
{
    Thread.sleep(x);
} 
catch(InterruptedException e)
{
    
}
  }
}