Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cmath>
- #include <iostream>
- using namespace std;
- double f (int n, double x) {
- return n > 0 ? f(n-1, tan(n * M_PI_2 + x)) : x;
- }
- int main() {
- cout << f(5, 1) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement