aboutsummaryrefslogtreecommitdiff
path: root/week03/exercise07.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'week03/exercise07.cpp')
-rw-r--r--week03/exercise07.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/week03/exercise07.cpp b/week03/exercise07.cpp
new file mode 100644
index 0000000..00fd65b
--- /dev/null
+++ b/week03/exercise07.cpp
@@ -0,0 +1,15 @@
+#include <iostream>
+
+int main() {
+ double num = 3.14159;
+ do {
+ if (num > 0) {
+ std::cout << "Positive" << std::endl;
+ }
+ else {
+ std::cout << "Negative" << std::endl;
+ }
+
+ std::cin >> num;
+ } while (num != 0);
+}