Skip to content

Commit d4f6b3d

Browse files
author
codehouseindia
authored
Merge pull request codehouseindia#1 from mayankgb2/patch-1
Added Random number generator program
2 parents 68c9cd1 + cc1aacc commit d4f6b3d

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)