Advertisement
Guest User

dadawawdwa

a guest
Oct 9th, 2015
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int a=0, t=0, k=0;
  5.  
  6. int fn(int a)
  7. {
  8. t+=2;
  9. if (a > 2)
  10. k += gn(a-1);
  11. return a + t;
  12. }
  13.  
  14. int gn(int t)
  15. {
  16. a++;
  17. if (t > 1)
  18. k += fn(t-1);
  19. return a + t;
  20. }
  21.  
  22. int main()
  23. {
  24.  
  25. fn(4);
  26.  
  27.  
  28. printf("%d",k);
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement