aboutsummaryrefslogtreecommitdiffstats
path: root/EvenOddCom1ex.cpp
diff options
context:
space:
mode:
authorzedarider <ymherklotz@gmail.com>2016-02-24 01:12:05 +0000
committerzedarider <ymherklotz@gmail.com>2016-02-24 01:12:05 +0000
commit08fdf56e21bcd9fe77508e98c9f65b9847d538ac (patch)
tree0fa4a49c7e796f3bff3729204249087e13e1012e /EvenOddCom1ex.cpp
downloadimperial_2015-08fdf56e21bcd9fe77508e98c9f65b9847d538ac.tar.gz
imperial_2015-08fdf56e21bcd9fe77508e98c9f65b9847d538ac.zip
final changes to game done
Diffstat (limited to 'EvenOddCom1ex.cpp')
-rw-r--r--EvenOddCom1ex.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/EvenOddCom1ex.cpp b/EvenOddCom1ex.cpp
new file mode 100644
index 0000000..aa3410e
--- /dev/null
+++ b/EvenOddCom1ex.cpp
@@ -0,0 +1,18 @@
+#include <iostream>
+#include <cmath>
+
+using namespace std;
+
+int main() {
+ int num;
+ cout << "Please enter a number: ";
+ cin >> num;
+ if(num % 2 == 0) {
+ cout << "even" << endl;
+ }
+ else {
+ cout << "odd" << endl;
+ }
+
+ return 0;
+} \ No newline at end of file