Assume that variable ??? is an integer variable which is assigned a random value from zero (0) to twenty (20). Imagine that there is an if-statement that will validate the value of ???. There are 10 scenarios showing the valid values of ??? as shown in the figure below. The valid values are the ones that are ??? shaded.
Write the shortest condition in the if-statement below that will make the unshaded values of row three (?) from the figure as valid.Note: You may only use the operators <,>, ==, !=, && and ||
Extracted text: 1. 2 3 4 5 6. 7 9. 10 11 12 13 14 15 16 17 18 19 20 2. 1 4 7 8 9. 10 11 12 13 14 15 16 17 18 19 20 3. 1 2 3 4 7 8 10 11 12 13 14 15 16 17 18 19 20 4. 7 9. 10 11 12 13 14 15 16 17 18 19 20 5. 1 2 3 4 5 8. 9. 10 11 12 13 14 15 16 17 18 19 20 1 3 4 8 10 11 12 13 14 15 16 17 18 19 20 7. 1 2 3 4 7 8. 9. 10 11 12 13 14 15 16 17 18 19 20 8. 1 3 4 5 7 8 10 11 12 13 14 15 16 17 18 19 20 9. 1 3 4 8. 10 11 12 13 14 15 16 17 18 19 20 10. 1 3 4 7 8. 9. 10 11 12 13 14 15 16 17 18 19 20 5 6.Extracted text: if ( System.out.printın(“Valid."); } _) {,>
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here