aboutsummaryrefslogtreecommitdiff
path: root/In-classExercise3
diff options
context:
space:
mode:
Diffstat (limited to 'In-classExercise3')
-rw-r--r--In-classExercise3/In-classExercise3/Source.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/In-classExercise3/In-classExercise3/Source.cpp b/In-classExercise3/In-classExercise3/Source.cpp
index f043d96..25ad5ed 100644
--- a/In-classExercise3/In-classExercise3/Source.cpp
+++ b/In-classExercise3/In-classExercise3/Source.cpp
@@ -1,17 +1,34 @@
/*Name:Reece Warner
Date:January 13th 2024
Class:CST116*/
-
+#include <iostream>
+using std::cin;
+using std::cout;
+using std::endl;
+int i = 0;
int main()
{
+ cout << "Please enter a whole number: ";
+
+ cin >> i;
+ if (i > 0)
+ {
+ cout << "Your number is positive\n";
+ }
+ else if (i < 0)
+ {
+ cout << "Your number is negative\n";
+ }
-
-
+ else
+ {
+ cout << "Your number is zero\n";
+ }
return 0;