Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Manume/f6df507f75ee0149b960 to your computer and use it in GitHub Desktop.

Select an option

Save Manume/f6df507f75ee0149b960 to your computer and use it in GitHub Desktop.
program for find the number is odd or even
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
int x;
cout << "Enter an integer : ";
cin>>x;
if(x%2==0)
cout << "The number " << x << " is even.";
else
cout << "The number " << x << " is odd.";
getch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment