From d9fd7e00a1e07e1d3c319d5d079b1231dfdd6171 Mon Sep 17 00:00:00 2001 From: rPatrickWarner Date: Sat, 13 Jan 2024 12:45:32 -0800 Subject: exercise completed --- In-classExercise3/In-classExercise3/Source.cpp | 23 ++++++++++++++++++++--- 1 file 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 +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; -- cgit v1.2.3