aboutsummaryrefslogtreecommitdiffstats
path: root/HelloWorld.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'HelloWorld.cpp')
-rw-r--r--HelloWorld.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/HelloWorld.cpp b/HelloWorld.cpp
new file mode 100644
index 0000000..aa3410e
--- /dev/null
+++ b/HelloWorld.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