-
Notifications
You must be signed in to change notification settings - Fork 8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a097d50
commit 318c89f
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
Program's_Contributed_By_Contributors/C++_Programs/Even or Odd.cpp
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
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; | ||
} |