aboutsummaryrefslogtreecommitdiff
path: root/Project1/program.cpp
diff options
context:
space:
mode:
authoraustinlujan <[email protected]>2024-03-07 14:07:54 -0800
committeraustinlujan <[email protected]>2024-03-07 14:07:54 -0800
commitafd857201e4f76636b81acb03fdebd7b34dccd5b (patch)
tree313957840d84706f0198e2be39408448f316dcec /Project1/program.cpp
parentcreated project (diff)
downloadin-class-exercise-3-austinlujan-afd857201e4f76636b81acb03fdebd7b34dccd5b.tar.xz
in-class-exercise-3-austinlujan-afd857201e4f76636b81acb03fdebd7b34dccd5b.zip
number program doneHEADmain
Diffstat (limited to 'Project1/program.cpp')
-rw-r--r--Project1/program.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/Project1/program.cpp b/Project1/program.cpp
index e43207f..3af16c7 100644
--- a/Project1/program.cpp
+++ b/Project1/program.cpp
@@ -1,12 +1,34 @@
-// Name: Austin Lujan
+ // Name: Austin Lujan
// Date: 1/16
// Class: CST 116
// Lecture
+#include <iostream>
+using std::cout;
+using std::cin;
+using std::endl;
int main()
{
+ cout << "Enter a whole number: ";
+
+ int number = 0;
+
+ cin >> number;
+
+ if (number > 0)
+ {
+ cout << "Your number is positive\n";
+ }
+ else if (number < 0)
+ {
+ cout << "Your number is negative\n";
+ }
+ else
+ {
+ cout << "Your number is zero\n";
+ }
return 0;
} \ No newline at end of file