This code is to check the number is even or odd
Is there easy way other then this?or without using if and else statement
#include<stdio.h>int main()
{
int num;
printf("Enter an integer: ");
scanf("%d",&num);
if (num&1)
printf("%d is an odd number", num);
else
printf("%d is an even number", num);
return 0;
}