Skip to content

Instantly share code, notes, and snippets.

@devteampentagon
Created January 10, 2017 20:13
Show Gist options
  • Select an option

  • Save devteampentagon/28ddebd585d44d9a7364a3fbeb0e783c to your computer and use it in GitHub Desktop.

Select an option

Save devteampentagon/28ddebd585d44d9a7364a3fbeb0e783c to your computer and use it in GitHub Desktop.
Odd or Even
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
if(n%2)
cout << n << " is an odd number" << endl;
else
cout << n << " is an even number" << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment