Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int f( int n, char start, char help, char end);
- int main()
- {
- printf("Hello, World!\n");
- f(3, 'a', 'b', 'c');
- return 0;
- }
- int f( int n, char start, char help, char end){
- if ( n==0 )
- return 0;
- f( n-1, start, end, help);
- printf("prebacujemo iz - %c - u kulicu - %c -\n", start, end);
- f( n-1, help, start, end);
- return 0;
- }
- /*
- if (n>0 && n%2 == 1){
- f( n-1, start, help, end );
- }
- else if (n>0 && n%2 == 0)
- f( n-1, help, start, end );
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement