anon606

№5

Oct 14th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <math.h>
  4.  
  5. float rec(int n)
  6. {
  7.     float sum = 0;
  8.     for (n; n != 0; --n)
  9.     {
  10.         sum = sqrt(sum + (n)*3);
  11.       }
  12. return sum;
  13. }
  14.  
  15. void main()
  16. {
  17.     int n;
  18.     printf("Vvedite n: ");
  19.    scanf("%i",&n);
  20.    printf("%f", rec(n));
  21.    getch();
  22. }
Advertisement
Add Comment
Please, Sign In to add comment