003-005-006

Bitwise Operator: Even or Odd Check

Easy

Problem Description

Bitwise Operator: Even or Odd Check

Learning Objective: Learn simple checking using bitwise AND operator

Overview

Let's learn the most commonly used AND operator (&) among bitwise operators. By AND-ing a number with 1, you can easily determine if it's even or odd!

Specifications

  • Display AND operation result of 7 and 1
  • Display AND operation result of 8 and 1

Output Format

7 & 1 = 1
8 & 1 = 0
```java

## Hint
The result is 1 for odd numbers, 0 for even numbers.

Test Cases

※ Output examples follow programming industry standards

Input:
Expected Output:
7 & 1 = 1
8 & 1 = 0
❌ Some tests failed
❌ エラー発生

Your Solution

Current Mode: My Code
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here

sc.close();
}
}
0 B / 5 MB

You have 10 free executions remaining