Advertisement
SStive39

OOP_k2l1v24

Sep 16th, 2021
806
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include <cmath>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. double f (int n, double x) {
  7.     return n > 0 ? f(n-1, tan(n * M_PI_2 + x)) : x;
  8. }
  9.  
  10. int main() {
  11.     cout << f(5, 1) << endl;
  12.  
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement