diff options
| author | Arthur Spears <[email protected]> | 2024-01-13 12:45:30 -0800 |
|---|---|---|
| committer | Arthur Spears <[email protected]> | 2024-01-13 12:45:30 -0800 |
| commit | b14dcbb3fdb1e17ab1f64f85893d868c5238f463 (patch) | |
| tree | 62bbdcb0be0fc8be72c3b32870846d9c3a897757 | |
| parent | Created project, added Source.cpp (diff) | |
| download | in-class-exercise-3-arthurtspears-develop.tar.xz in-class-exercise-3-arthurtspears-develop.zip | |
Exercise completed!develop
| -rw-r--r-- | In-ClassExercise3/In-ClassExercise3/Source.cpp | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/In-ClassExercise3/In-ClassExercise3/Source.cpp b/In-ClassExercise3/In-ClassExercise3/Source.cpp index 29d6b08..98c8ac0 100644 --- a/In-ClassExercise3/In-ClassExercise3/Source.cpp +++ b/In-ClassExercise3/In-ClassExercise3/Source.cpp @@ -1,2 +1,38 @@ // Name: Arthur Spears -//
\ No newline at end of file +// Date: 113/24 +// Class: CST 116 +// Assignment: InClass Exercise 3 + +#include <iostream> + +using std::cout; +using std::cin; +using std::endl; + + +int main() +{ + + + cout << "Please enter a whole number: "; + + int i = 0; + + cin >> i; + + if(i > 0) + { + cout << "Your number is positive" << endl; + } + else if (i < 0) + { + cout << "Your number is negative" << endl; + } + else + { + cout << "Your number is zero.\n"; + } + + + return 0; +}
\ No newline at end of file |