JAVA
Where is the problem in the following code sequence? The code is intended to generate random numbers between 1 and 10 until the number is either a 7 or a 5. Fix the problem.
Random random = new Random();
int number = 1 + random.nextInt(10);
while(number != 7 || number != 5)
{
number = 1 + random.nextInt(10);
}
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