Advertisement
Josif_tepe

Untitled

Nov 12th, 2023
713
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <ctype.h>
  5. #include <math.h>
  6.  
  7. void f(int broj) {
  8.     if(broj == 0) {
  9.         return;
  10.     }
  11.     for(int i = 0; i < broj; i++) {
  12.         printf("%d ", broj);
  13.     }
  14.     f(broj - 1);
  15. }
  16.  
  17. int main(int argc, char * argv[]) {
  18.  
  19.     f(4);
  20.     return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement