Even Odd

#include<stdio.h>

int main() {
	int no;
	printf("Check the given number is Odd or Even\n");
	printf("Enter a number:\n");
	scanf("%d", &no);

	/* Check the modulus of 'no' is zero or not */
	if(no % 2 == 0)
		printf("It's a Even Number!\n");
	else
		printf("It's a Odd Number!\n");
	return 0;
}


/* Output */
Check the given number is Odd or Even
Enter a number:
6

It's a Even Number!

/* ---------------------------------------- */

Check the given number is Odd or Even
Enter a number:
5

It's a Odd Number!

Comments (0)

  • To add your comment please or

We use cookies to improve your experience on our site and to show you personalised advertising. Please read our cookie policy and privacy policy.

Got It!