Skip to content

Commit cc1aacc

Browse files
authored
Added Random number generator program
1 parent 68c9cd1 commit cc1aacc

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

random.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import java.util.*;
2+
class GenerateRandomNumber {
3+
public static void main(String[] args) {
4+
int counter;
5+
Random rnum = new Random();
6+
System.out.println("Random Numbers:");
7+
System.out.println("***************");
8+
for (counter = 1; counter <= 5; counter++) {
9+
System.out.println(rnum.nextInt(200));
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)