Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void funkcja(int ilosc, char znak)
- {
- if(ilosc)
- {
- funkcja(ilosc-1,znak);
- printf("%c",znak);
- }
- }
- int main()
- {
- char znak;
- char oddzielacz;
- int ilosc;
- printf("Podaj znaki ktore chcesz powtarzac\n");
- scanf("%c",&znak);
- printf("Podaj ile znakow chcesz umiescic przed lustrem, a nastepnie znak ktory ma stanowic lustro\n");
- scanf("%d %c",&ilosc, &oddzielacz);
- funkcja(ilosc,znak);
- printf("%c",oddzielacz);
- funkcja(ilosc,znak);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement