13 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. import java.util.Scanner;
    class Compare
    {
    public static void main(String args[])
    {
    int number;
    System.out.println("enter the number");
    Scanner sc=new Scanner(System.in);
    number=sc.nextInt();
    int i;
    i=number%2;
    if(i==0)
    {
    System.out.println("number is even");
    }
    else
    {
    System.out.println("number is odd");
    }
    }
    }

    ReplyDelete
  4. import java.util.Scanner;

    Class Test {
    public static void main(String args[]){
    Scanner sc= new Scanner(System.in);
    double input;
    int typecast;
    System.out.println("Enter number to check odd or even");
    input=sc.nextDouble();
    typecast=(int)input;
    If(typecast%2==0){System.out.println("Even Number");}
    Else{System.out.println("Odd Number");}


    }

    }

    ReplyDelete
  5. import java.util.Scanner;
    class OddEven
    {
    public static void main(String ar[])
    {double inputvalue;
    int casting;
    Scanner scan=new Scanner(System.in);
    System.out.print("Enter the number");
    inputvalue=scan.nextDouble();
    casting=(int)inputvalue;
    if(casting%2==0)
    {
    System.out.print("Enterned number is even");

    }
    else{
    System.out.print("Enterned number is odd");
    }


    }
    }

    ReplyDelete
  6. import java.util.Scanner;

    class Test{

    public static void main(String ar[]){

    double a;
    System.out.print("Enter the number: ");
    Scanner obj=new Scanner(System.in);
    a=obj.nextDouble();
    // System.out.print("Enter the second number: ");
    // b=obj.nextDouble();
    if(a%2==0)
    { System.out.println("The no. is even");
    }
    else
    System.out.println("The no. is odd");

    }
    }

    ReplyDelete
  7. import java.util.Scanner;
    class A
    {
    public static void main(String args[])
    {
    Scanner obj=new Scanner(System.in);
    int n;
    n=obj.nextInt();
    if(n%2==0)
    System.out.println("No.is even");
    else
    System.out.println("The no. is odd");
    }
    }

    ReplyDelete

  8. import java.util.Scanner;

    class even_odd {
    public static void main(String ar[])
    {
    Scanner checknum = new Scanner(System.in);
    float num;
    System.out.println("enter the number");
    num = checknum.nextFloat();
    if(num%2==0)
    System.out.println("the number is even");
    else
    System.out.println("the number is odd");

    }

    }

    ReplyDelete
  9. package world;
    import java.util.Scanner;
    public class Evennumber
    {
    public static void main(String args[])
    {
    System.out.println("enter number");
    Scanner sc=new Scanner(System.in);
    int x=sc.nextInt();
    if(x%2==0)
    System.out.println("even number");
    else

    System.out.println("odd number");

    }

    }

    ReplyDelete
  10. import java.util.Scanner;
    class Eve1{
    public static void main(String ar[]){
    Scanner obj=new Scanner(System.in);
    int num;
    System.out.println("enter the value of number");
    num=obj.nextInt();
    if(num%2==0)
    System.out.println("number is even");
    else
    System.out.println("no. is odd");
    }
    }

    ReplyDelete
  11. import java.util.Scanner;

    class Evenodd{
    public static void main(String ar[]){
    int a;

    Scanner scan=new Scanner(System.in);
    System.out.println("Enter the number:");
    a=scan.nextInt();

    if(a%2==0)
    System.out.println("The number is even");
    else
    System.out.println("The number is odd");
    }
    }

    ReplyDelete
  12. import java.util.*;
    class Eveodd{
    public static void main(String ar[]){
    Scanner s=new Scanner(System.in);
    int n;
    System.out.print("enter the number: ");
    n=s.nextInt();
    if(n%2==0)
    System.out.print("the no. is even");
    else
    System.out.print("the no. is odd");
    }
    }

    ReplyDelete
  13. import java.util.Scanner;

    class EvenOdd{

    public static void main(String ar[]){

    int a;

    Scanner scan=new Scanner(System.in);

    System.out.println("Enter Value of a");

    a=scan.nextInt();

    if(a%2==0)
    System.out.println("No. is Even");
    else
    System.out.println("No. is Odd");
    }

    }

    ReplyDelete