public class Examples {
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
System.out.println("Enter the number");
int number=sc.nextInt();
if(number%2==0) {
System.out.println("The given number is Even");
}
else
{
System.out.println("The given number is Odd");
}
}
}
O/P:
Enter the number
21
The given number is Odd
Top comments (0)