Even Odd

using namespace std;

int main() {
	int no;
	cout << "Enter a number:\n";
	cin >> no;

	/* Check the modulus of 'no' is zero or not */
	if(no%2 != 0)
		cout << "The given no is ODD!\n";
		cout << "The given no is EVEN!\n";
	return 0;

/* Output */
Enter a number:

The given no is EVEN!

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

Enter a number:

The given no is ODD!

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!