Check Even-Odd Number


C Program to check whether the number is Even or Odd .

						
#include <stdio.h>
void main(){
	int n;
	printf("Enter a number to check whether it is even or odd\n");
	scanf("%d",&n);
	
	if( n % 2 == 0){
		printf("Entered number is even");
	}
	else
		printf("Entered number is odd");
    
}


									

Output (case 1):

Output








Output (case 2):

Output