Website Summary Files Commits Branches @commit @diff @stats
path: root / Week03 / Exercise13.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/Exercise13.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, 16 insertions, 0 deletions
-rw-r--r--Week03/Exercise13.cpp16
diff --git a/Week03/Exercise13.cpp b/Week03/Exercise13.cpp
new file mode 100644
index 0000000..f38156e
--- /dev/null
+++ b/Week03/Exercise13.cpp
@@ -0,0 +1,16 @@
+#include <iostream>
+
+int main() {
+ const double PI = 3.14159;
+
+ double alpha, beta;
+ std::cin >> alpha >> beta;
+
+ double x = alpha + beta;
+ double sinx = (16.0 * x * (PI - x)) / (5 * PI * PI - 4 * x * (PI - x));
+ x += PI / 2;
+ double cosx = (16.0 * x * (PI - x)) / (5 * PI * PI - 4 * x * (PI - x));
+ std::cout << (sinx / cosx);
+
+ return 0;
+}