In this tutorial, we will write a C Program to find whether the given number is even or odd in C Programming with practical program code and step-by-step full complete explanation.
C Program to find whether the given number is even or odd.
#include<stdio.h> #include<conio.h> void main() { int n; clrscr(); printf("Enter any number: "); scanf("%d",&n); if(n%2 == 0) printf("Number is Even"); else printf("Number is odd"); getch(); }
Output
Enter any number: 5 Number is odd