Skip to content

Commit

Permalink
Create Even or Odd.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
srravigupt authored Oct 1, 2021
1 parent a097d50 commit 318c89f
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 318c89f

Please sign in to comment.