Contact Learn C
Copy Program Share Program

Program 347 : Odd or Even number using Bitwise Operations

Program 347 : Odd or Even number using Bitwise Operations
 
#include<stdio.h>
main()
{
 int a;
 printf("Enter a number to find whether it is odd or even\n");
 scanf("%d",&a);
 if((a&1)==1)
 {
  printf("Odd\n");
 }
 else
 {
  printf("Even\n");
 }
}
Explanation:
//Coming Soon

Output: 

Odd or Even number using Bitwise Operations

Odd or Even number using Bitwise Operations





 

No comments:

Post a comment

Get Project/Assignment of your own choice



Donate

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide