1class GenerateRandom {
2 public static void main( String args[] ) {
3 int min = 50;
4 int max = 100;
5
6 //Generate random int value from 50 to 100
7 System.out.println("Random value in int from "+min+" to "+max+ ":");
8 int random_int = (int)Math.floor(Math.random()*(max-min+1)+min);
9 System.out.println(random_int);
10 }
11}