In this program we can verify whether number is even or odd.
import java.io.*;
Class program
{
public Static void main(Strings args[]) throws IOException
{
int a=15;
if(a%2==0)
{
System.out.println("Number is even"+a);
else
System.out.println("Number is odd"+a);
}
}
import java.io.*;
Class program
{
public Static void main(Strings args[]) throws IOException
{
int a=15;
if(a%2==0)
{
System.out.println("Number is even"+a);
else
System.out.println("Number is odd"+a);
}
}
0 comments:
Post a Comment