Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <ctype.h>
- #include <math.h>
- void f(int broj, char c) {
- if(broj == 0) {
- return;
- }
- for(int i = 0; i < broj; i++) {
- printf("%c ", c);
- }
- f(broj - 1, c - 1);
- }
- int main(int argc, char * argv[]) {
- int broj;
- char c;
- scanf("%d", &broj);
- scanf(" %c", &c);
- printf("%d %c\n", broj, c);
- f(broj, c);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement