diff options
| author | Nataliia Brown <[email protected]> | 2024-01-13 12:45:38 -0800 |
|---|---|---|
| committer | Nataliia Brown <[email protected]> | 2024-01-13 12:45:38 -0800 |
| commit | 2ef927a546a910fe0a42983dd024d713aaddea12 (patch) | |
| tree | a2e9b11f67b7802cc1716a5bd8b8b4ffc456f725 /InClassExercise3/Project1/IN-class.cpp | |
| parent | Created a forlder (diff) | |
| download | in-class-exercise-3-natabrown-2ef927a546a910fe0a42983dd024d713aaddea12.tar.xz in-class-exercise-3-natabrown-2ef927a546a910fe0a42983dd024d713aaddea12.zip | |
New forlder
Diffstat (limited to 'InClassExercise3/Project1/IN-class.cpp')
| -rw-r--r-- | InClassExercise3/Project1/IN-class.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/InClassExercise3/Project1/IN-class.cpp b/InClassExercise3/Project1/IN-class.cpp index 48468dd..99938bc 100644 --- a/InClassExercise3/Project1/IN-class.cpp +++ b/InClassExercise3/Project1/IN-class.cpp @@ -1,17 +1,38 @@ +#include <iostream> // Name: Nataliia Brown // Date: 1/13/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\n"; + } + if (i < 0) + { + cout << "Your number is negative\n"; + } + else + { + cout << "Your number is zero.\n"; + } - return 0: + return 0; }
\ No newline at end of file |