Created
November 8, 2015 18:17
-
-
Save nalin-adh/62920df91a10268f4cee to your computer and use it in GitHub Desktop.
A C++ program that checks whether a number is odd or even.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<conio.h> | |
using namespace std; | |
int main() | |
{ | |
int n; | |
cout<<"Enter any number : "; | |
cin>>n; | |
if(n%2==0) | |
cout<<n<<" is even"; | |
else | |
cout<<n<<" is odd"; | |
getch(); | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment