/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

Popular posts from this blog

A story of friendship A tiger and a rat......become a revengable....

best pen drive

wap to perform subtraction