aboutsummaryrefslogtreecommitdiff
path: root/In-classExercise3
diff options
context:
space:
mode:
authorrPatrickWarner <[email protected]>2024-01-13 12:45:32 -0800
committerrPatrickWarner <[email protected]>2024-01-13 12:45:32 -0800
commitd9fd7e00a1e07e1d3c319d5d079b1231dfdd6171 (patch)
tree38ab267cf4e491fa9b847f4aabdb67d81390e26c /In-classExercise3
parentcreated project added source.cpp (diff)
downloadin-class-exercise-3-reecepwarner-develop.tar.xz
in-class-exercise-3-reecepwarner-develop.zip
exercise completeddevelop
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;