Click here to Upload your own logic for this program.

Write a program to print the given number is an even or odd number.


Program:


#include<stdio.h> main() { int n; printf("Enter a number:"); scanf("%d",&n); if(n%2==0) printf("It is an even number"); else printf("It is an odd number"); }
Output:
		

Enter a number:4 It is an even number