Advertisement
josiftepe

Untitled

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