/wap to check wheather an input even or odd
//wap to check wheather an input even or odd
import java.util.Scanner;
class even
{
public static void main(String[] arg)
{
Scanner sc=new Scanner(System.in);
System.out.println("enter number ");
int num=sc.nextInt();
if(num%2==0)
{
System.out.println("number is even");
}
else
{
System.out.println("Input character is a odd");
}
}
}
Comments
Post a Comment