Advertisement
Josif_tepe

Untitled

Dec 10th, 2022
570
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.  
  3.  
  4. void rekurzija(int x) {
  5.     if(x > 10) {
  6.         return;
  7.     }
  8.     printf("%d ", x);
  9.     rekurzija(x + 1);
  10. }
  11. int main() {
  12.     rekurzija(1);
  13.     return 0;
  14. }
  15. /*
  16.  
  17.  rekurzija(1) --> rekurzija(2)
  18.  rekurzija(2) --> rekurzija(3)
  19.  rekurzija(3) --> rekurzija(4)
  20.  
  21.  */
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement