19. Program to Check Whether a Number is Even or Odd


Comments

  1. //*19. Program to Check Whether a Number is Even or Odd //
    #include
    #include
    void main()
    {
    int n;
    clrscr();
    printf("\n\tEnter an number");
    scanf("%d", &n);
    if (n%2 == 0)
    printf("\n\t No is Even");
    else
    printf("\n\t No is Odd");
    getch();
    }

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

    ReplyDelete
  3. /*Program to Check Whether a Number is Even or Odd*/
    #include
    #include
    void main()
    {
    int a;
    clrscr();
    printf("Enter Your Number=");
    scanf("%d",&a);
    if(a%2)
    {
    printf("Your Number is Even");
    }
    else
    {
    printf("Your Number is odd");
    }
    getch();
    }

    ReplyDelete
  4. #include
    #include
    void main()
    {
    int a;
    clrscr();
    printf("enter the no");
    scanf("%d",&a);
    if(a%2==0)

    {
    printf("the no is even");

    }
    else

    {
    printf("the no is odd");
    }
    getch();

    }

    ReplyDelete

Post a Comment