Advertisement
josiftepe

Untitled

Nov 14th, 2021
803
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void pecati(int broj) {
  5.     if(broj > 10) {
  6.         return;
  7.     }
  8.     pecati(broj + 1);
  9.    
  10.     printf("%d ", broj);
  11.    
  12. }
  13. int main(){
  14.     pecati(1);
  15.     return 0;
  16. }
  17. /*
  18.  pecati(1) (1)
  19.  pecati(2) (2)
  20.  pecati(3) (3)
  21.  pecati(4) (4)
  22.  pecati(5) (5)
  23.  pecati(6) (6)
  24.  pecati(7) (7)
  25.  pecati(8) (8)
  26.  pecati(9) (9)
  27.  pecati(10) (10)
  28.  pecati(11)
  29.  
  30.  
  31.  
  32.  */
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement