diff options
| author | rPatrickWarner <[email protected]> | 2024-01-13 12:45:32 -0800 |
|---|---|---|
| committer | rPatrickWarner <[email protected]> | 2024-01-13 12:45:32 -0800 |
| commit | d9fd7e00a1e07e1d3c319d5d079b1231dfdd6171 (patch) | |
| tree | 38ab267cf4e491fa9b847f4aabdb67d81390e26c | |
| parent | created project added source.cpp (diff) | |
| download | in-class-exercise-3-reecepwarner-d9fd7e00a1e07e1d3c319d5d079b1231dfdd6171.tar.xz in-class-exercise-3-reecepwarner-d9fd7e00a1e07e1d3c319d5d079b1231dfdd6171.zip | |
exercise completeddevelop
| -rw-r--r-- | In-classExercise3/In-classExercise3/Source.cpp | 23 |
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; |