- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathoddev.java
More file actions
Latest commit
14 lines (14 loc) · 471 Bytes
/
Copy pathoddev.java
File metadata and controls
14 lines (14 loc) · 471 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//this program input from user and identifies whether the number is odd or even
importjava.util.*;
publicclassoddev {
publicstaticvoidmain(String[] args) {
Scannerinput = newScanner(System.in);
System.out.println("Enter the number:");
intx = input.nextInt();
if(x%2 ==0){
System.out.println("The Number is Even");
}else{
System.out.println("The Number is Odd");
}
}
}