- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathodd.java
More file actions
Latest commit
18 lines (15 loc) · 353 Bytes
/
Copy pathodd.java
File metadata and controls
18 lines (15 loc) · 353 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
importjava.util.Scanner;
classFirstclass{
publicstaticvoidmain(String[] args) {
System.out.println("enter your number\n");
Scannersc = newScanner(System.in);
intnum = sc.nextInt();
if(num % 2 == 0){
System.out.println("even\n");
}
else{
System.out.println("add\n");
}
System.out.println("thank you");
}
}