Created
June 21, 2018 04:24
-
-
Save aligalehban/b88bde683c518103944d46cefefcd4d3 to your computer and use it in GitHub Desktop.
check number is odd or even number c++ source code - www.alighalehban.com
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> | |
using namespace std; | |
int main() | |
{ | |
int n; | |
cout << "Enter an integer: "; | |
cin >> n; | |
if ( n % 2 == 0) | |
cout << n << " is even."; | |
else | |
cout << n << " is odd."; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment