Website Summary Files Commits Branches @commit @diff @stats
path: root / Week03 / Exercise03.cpp
diff options
context:
space:
mode:
Commiteb8b89e3622f5a77027fe88930b6d38cfe73b774 (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-10-18 14:40:29 +0300
Committer
 Syndamia <kamen@syndamia.com>
2025-10-18 14:41:48 +0300
Filesb986b23dc049adf9f9442afac5e26f439ca60a26 /Week03/Exercise03.cpp
upp-2025-solutions-eb8b89e3622f5a77027fe88930b6d38cfe73b774.tar
upp-2025-solutions-eb8b89e3622f5a77027fe88930b6d38cfe73b774.tar.gz
upp-2025-solutions-eb8b89e3622f5a77027fe88930b6d38cfe73b774.zip
Parentecf6048c3bbb0c9395ac524921a19f38ef3887ea (diff)
feat(Week03): Add exercises and solutions
1 files changed, 19 insertions, 0 deletions
-rw-r--r--Week03/Exercise03.cpp19
diff --git a/Week03/Exercise03.cpp b/Week03/Exercise03.cpp
new file mode 100644
index 0000000..3d76b46
--- /dev/null
+++ b/Week03/Exercise03.cpp
@@ -0,0 +1,19 @@
+#include <iostream>
+
+int main() {
+ int a, b, c;
+ std::cin >> a >> b >> c;
+ /* Алтернативно може да направите:
+ * int a;
+ * int b;
+ * int c;
+ * std::cin >> a;
+ * std::cin >> b;
+ * std::cin >> c;
+ */
+
+ std::cout << ((b - a) == (c - b));
+ /* Друга формула, която също работи е:
+ * (a + c) / 2 == b
+ */
+}