Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class Number
- {
- public static void main(String args[])
- {
- Scanner sc=new Scanner(System.in);
- System.out.println("Enter a number");
- int num=sc.nextInt();
- if((num%2)==0)
- System.out.println("Even");
- else
- System.out.println("Odd");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement