Advertisement
Josif_tepe

Untitled

Nov 12th, 2023
751
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 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, char c) {
  8.     for(int i = broj; i > 0; i--) {
  9.         for(int j = 0; j < i; j++) {
  10.             printf("%c ", c);
  11.            
  12.         }
  13.         c -= 1;
  14.     }
  15. }
  16.  
  17. int main(int argc, char * argv[]) {
  18.     int broj;
  19.     char c;
  20.     scanf("%d", &broj);
  21.     scanf(" %c", &c);
  22.    
  23.     printf("%d %c\n", broj, c);
  24.     f(broj, c);
  25.    
  26.     return 0;
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement