aboutsummaryrefslogtreecommitdiff
path: root/week03/exercise07.cpp
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2023-11-02 15:00:22 +0200
committerSyndamia <kamen@syndamia.com>2023-11-02 15:00:22 +0200
commitd09b1a288ae51fe2e141676948d225296f2f7d72 (patch)
tree7e3666545c04c4602be5374859001bf03e98f4b3 /week03/exercise07.cpp
parentfbbe586d25b1ebaf66fe2e92e1986bb5debf961d (diff)
downloadupp-2023-solutions-d09b1a288ae51fe2e141676948d225296f2f7d72.tar
upp-2023-solutions-d09b1a288ae51fe2e141676948d225296f2f7d72.tar.gz
upp-2023-solutions-d09b1a288ae51fe2e141676948d225296f2f7d72.zip
[w3] Added solutions
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);
+}