Even or odd in "C" program



  1. #include <stdio.h>  
  2. int main()
  3. {
  4.    int i;
  5.    
  6.    printf("Enter an number\n");
  7.    scanf("%d", &i);
  8.    
  9.    if (i%2 == 0)
  10.       printf("Even\n");
  11.    else
  12.       printf("Odd\n");
  13.      
  14.    return 0;
  15. }






















6 Comments

thank u so much
love 3

  1. Looking for the Genuine Experience Certificate with 100% Complete Verification So Contact Experienced Letter Solutions Consulting Firms Which Provide Experienced Letter with100 % Guaranteed. Contact Now- 9599119376. Or Visit Website- https://experincedletter.blogspot.com/

    ReplyDelete
  2. Looking for the Genuine Experience Certificate with 100% Complete Verification So Contact Experienced Letter Solutions Consulting Firms Which Provide Experienced Letter with100 % Guaranteed. Contact Now- 9599119376. Or Visit Website- https://experincedletter.blogspot.com/

    ReplyDelete
  3. Nice article . you can use & operator for checking even or odd any number reference check even or odd without modulo

    ReplyDelete

Post a Comment

thank u so much
love 3

Previous Post Next Post