From a1158c12daaae4972ec45f192011b9f2b8a89506 Mon Sep 17 00:00:00 2001 From: Connor McDowell Date: Sat, 9 Mar 2024 18:48:11 -0800 Subject: exercise completed --- Project1/project.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Project1/project.cpp (limited to 'Project1/project.cpp') diff --git a/Project1/project.cpp b/Project1/project.cpp new file mode 100644 index 0000000..f9451df --- /dev/null +++ b/Project1/project.cpp @@ -0,0 +1,31 @@ +// name: Connor Mcdowell +// date: 3/9/2024 +// class: CST 116 +// reason: in class exercise number 3. + +#include + +using std::cin; +using std::cout; +using std::endl; + +int main() +{ + int input = 0; + cout << "Please enter a number: "; + cin >> input; + cout << " " << endl; + if(input == 0) + { + cout << "Your input is exactly 0!" << endl; + } + if(input < 0) + { + cout << "Your number is a negative number!" << endl; + } + if(input > 0) + { + cout << "Your number is a positive number!" << endl; + } + return 0; +} \ No newline at end of file -- cgit v1.2.3