diff --git a/Program's_Contributed_By_Contributors/C++_Programs/Even or Odd.cpp b/Program's_Contributed_By_Contributors/C++_Programs/Even or Odd.cpp new file mode 100644 index 0000000000..3f4a649770 --- /dev/null +++ b/Program's_Contributed_By_Contributors/C++_Programs/Even or Odd.cpp @@ -0,0 +1,16 @@ +#include +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; +}