import java.io.*;
class EvenOrOdd
{
public static void main(String args[])
{
int num;
DataInputStream r = new DataInputStream(System.in);
try
{
System.out.println("Enter the number");
num = Integer.parseInt(r.readLine());
if(num%2==0)
{
System.out.println("Number is Even");
}
else
{
System.out.println("Number is Odd");
}
}
catch(Exception e)
{
System.out.println("Error is occur in = "+e);
}
}
}
class EvenOrOdd
{
public static void main(String args[])
{
int num;
DataInputStream r = new DataInputStream(System.in);
try
{
System.out.println("Enter the number");
num = Integer.parseInt(r.readLine());
if(num%2==0)
{
System.out.println("Number is Even");
}
else
{
System.out.println("Number is Odd");
}
}
catch(Exception e)
{
System.out.println("Error is occur in = "+e);
}
}
}
No comments:
Post a Comment