diff options
| author | austinlujan <[email protected]> | 2024-03-07 14:07:54 -0800 |
|---|---|---|
| committer | austinlujan <[email protected]> | 2024-03-07 14:07:54 -0800 |
| commit | afd857201e4f76636b81acb03fdebd7b34dccd5b (patch) | |
| tree | 313957840d84706f0198e2be39408448f316dcec /Project1/program.cpp | |
| parent | created project (diff) | |
| download | in-class-exercise-3-austinlujan-main.tar.xz in-class-exercise-3-austinlujan-main.zip | |
Diffstat (limited to 'Project1/program.cpp')
| -rw-r--r-- | Project1/program.cpp | 24 |
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 |