From 5c3b97fb2572ce8940439abd0652d2a7f7a623bd Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 11 Jan 2026 13:43:39 +0200 Subject: feat(Week13): Add solutions to most exercises --- Week13/Exercise15.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Week13/Exercise15.cpp (limited to 'Week13/Exercise15.cpp') diff --git a/Week13/Exercise15.cpp b/Week13/Exercise15.cpp new file mode 100644 index 0000000..17f75f6 --- /dev/null +++ b/Week13/Exercise15.cpp @@ -0,0 +1,19 @@ +#include +#include + +double eccentricAnomaly(double M, double e, unsigned depth) { + if (depth == 0) + return M; + return M + e * sin(eccentricAnomaly(M, e, depth - 1)); +} + +int main() +{ + double M, e; + unsigned depth; + std::cin >> M >> e >> depth; + + std::cout << eccentricAnomaly(M, e, depth) << std::endl; + + return 0; +} -- cgit v1.3.1-23-gd82d