Loading Posts...

Program to Check Even or Odd Number

Program to Check Even or Odd Number
import java.util.*;
public class JavaApplication1 
{
   
    public static void main(String[] args) 
{
        
        int n;
Scanner sc=new Scanner(System.in);
System.out.println("enter n=");
n=sc.nextInt();
if(n%2==0)
{
System.out.println("even no");
}
else
{
System.out.println("odd no");
}
    }
    
}

 

krish..

The author didnt add any Information to his profile yet

Leave a Comment

Loading Posts...
Inline
Inline