Skip to content

Instantly share code, notes, and snippets.

@nalin-adh
Created November 8, 2015 18:17
Show Gist options
  • Save nalin-adh/62920df91a10268f4cee to your computer and use it in GitHub Desktop.
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.
#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