/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....

How one can earn money by using Facebook?

French Open • Aryna Sabalenka • Ana Konjuh • Tennis • Naomi Osaka • Women's Tennis Association • Ashleigh Barty