Skip to content

Commit

Permalink
Merge pull request #202 from srravigupt/patch-1
Browse files Browse the repository at this point in the history
Create Even or Odd.cpp
  • Loading branch information
fineanmol committed Oct 1, 2021
2 parents 137ba56 + 318c89f commit 4b6bf81
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Program's_Contributed_By_Contributors/C++_Programs/Even or Odd.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#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;
}

0 comments on commit 4b6bf81

Please sign in to comment.