Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- float rad(int n)
- {
- if (n==1) return sqrt(2);
- else return sqrt(2+rad(n-1));
- }
- int main(void)
- {
- int n;
- scanf("%d",&n);
- printf("%f\n",rad(n));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement