Math.random in Java- Generating a random number then generating more random numbers based on the first random
i'm running a loop 3 times.  at first i create a random number from 1 to 10.  let's say the first loop produces the number 5. then i need to generate 5 random numbers between 50 and 60. this is where i run into a problem.  here is what i have....

public class RandomNum {

	public static void main(String[] args) {
		for (int i =1; i < 4; i++){
			int random1 = (int) ((10 - 1 + 1) * Math.random() + 1);
			System.out.println("Random number generated: " + random1);
	                     // ???????	
			int random2 = (int) ((60 - 50 + 1) * Math.random() + 50);
			System.out.println("this is generated too: " + random2);
			
		}
	}
}

ex of expected out put...

Random number generated: 5
this is generated too: 51
this is generated too: 59
this is generated too: 56
this is generated too: 58
this is generated too: 50


Math.random in Java- Generating a random number then generating more random numbers based on the first random
===

i'm running a loop 3 times.  at first i create a random number from 1 to 10.  let's say the first loop produces the number 5. then i need to generate 5 random numbers between 50 and 60. this is where i run into a problem.  here is what i have....

public class RandomNum {

	public static void main(String[] args) {
		for (int i =1; i < 4; i++){
			int random1 = (int) ((10 - 1 + 1) * Math.random() + 1);
			System.out.println("Random number generated: " + random1);
	                     // ???????	
			int random2 = (int) ((60 - 50 + 1) * Math.random() + 50);
			System.out.println("this is generated too: " + random2);
			
		}
	}
}

ex of expected out put...

Random number generated: 5
this is generated too: 51
this is generated too: 59
this is generated too: 56
this is generated too: 58
this is generated too: 50

