Write a C program to check a number is even or odd.

Added 2 years ago
Active
Viewed 980
Ans
#include<stdio.h>
#include<conio.h>
main()
{
	int n;
	printf("\n enter any number");
	scanf("%d",&n);
	if(n%2==0)
	 printf("\n the number is even");
	else
	 printf("\n the number is odd");
	getch();  
}


Output:



Related Questions