Advertisement
lukasd

silnia rekurencja

Feb 4th, 2018
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.17 KB | None | 0 0
  1. int rekur(int a)
  2. {
  3.     if (a > 0)
  4.     {
  5.         return a*rekur(a - 1);
  6.         //rekur(a);
  7.     }
  8.     else
  9.     {
  10.         return 1;
  11.     }
  12. }
  13. void kolos1()
  14. {
  15.  
  16.     int a = 3;
  17.     printf("%d",rekur(a));
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement