Advertisement
Guest User

16

a guest
Feb 27th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. float rad(int n)
  5. {
  6.     if (n==1) return sqrt(2);
  7.     else return sqrt(2+rad(n-1));
  8. }
  9. int main(void)
  10. {
  11.     int n;
  12.     scanf("%d",&n);
  13.     printf("%f\n",rad(n));
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement