HELP NEEDED ASAP FOR HW!
LANGUAGE JAVA
Where is the problem in the following code sequence? The code is intended to generate random numbers between 1 and 20 until the number is either a 5 or a 10 or a 15.
Random random = new Random();
int number = 1 + random.nextInt(20);
while(number != 5 || number != 10 || number != 15)
{
number = 1 + random.nextInt(20);
}
System.out.println("number is " + number);
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here