The following code contains a logic error:Scanner console = new Scanner(System.in);System.out.print("Type a number: ");int number = console.nextInt();if (number % 2 == 0) {if (number % 3 == 0) {System.out.println("Divisible by 6.");} else {System.out.println("Odd.");}}Examine the code and describe a case in which the code would printsomething that is untrue about the number that was entered. Explainwhy. Then correct the logic error in the code.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here