import java.util.*;
public class Ifelse
{
public static void main(String[] args)
{
Scanner scan=new Scanner(System.in);
System.out.println("enter number to find even or odd");
int number=scan.nextInt();
if(number%2==0)
{
System.out.println("even number");
}
else
{
System.out.println("odd number");
}
}
}
public class Ifelse
{
public static void main(String[] args)
{
Scanner scan=new Scanner(System.in);
System.out.println("enter number to find even or odd");
int number=scan.nextInt();
if(number%2==0)
{
System.out.println("even number");
}
else
{
System.out.println("odd number");
}
}
}
No comments:
Post a Comment