check even or odd using bitwise operator

#include<stdio.h>
int main() {
    int x;
    scanf("%d",&x);
    if(x&1)
    printf("Odd number");
    else
    printf("Even Number");
   
return 0; 
}

No comments:

Post a Comment