package javaapplication4;
import java.util.Scanner;
public class JavaApplication4 {
public static void main(String[] args)
{
Scanner obj=new Scanner(System.in);
int i;
System.out.println("Enter the Number: ");
i=obj.nextInt();
if (i%2==0)
{
System.out.println(i+" is an even number");
}
else
{
System.out.println(i+" is an Odd number");
}
}
}
No comments:
Post a Comment