Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

even odd c++

#include <iostream>
using namespace std;

int main()		{
	int x;
	cout << "Enter a number:";
	cin >> x;
		if (x%2==0)
		 	{
				cout <<x<<" is an EVEN number.";
			}
		else
			{
				cout <<x<<" is an ODD number.";
			}
	return 0;
				}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #odd
ADD COMMENT
Topic
Name
2+3 =