Okay so the job of this program is to have a robot take steps of 1,2,3 meter in a amount of steps asked by the user. After the user inputs a value, the program will tell them that the robot can walk "user input" meter in a certain amount of ways.
If the user enters "4"
The program enters 4 meters and uses a recursive function to print how many steps it will take.
To Travel 4 meters, a robot has 7 ways to do it
This is the part I have down right now
The other part is to display all of the possibilities. So after that is printed
1 1 1 1
2 1 1
1 2 1
1 1 2
How do I go about printing this part of the code?
int walk(int distance);
printf("A robot can walk 1,2 or 3 meter at a time\n");
printf("This program will give all the possible combinations the \n robot can walk \n");
printf("\n How far would you like the robot to walk? ");
printf(" \n A robot can not walk a negitive distance \n");
count = walk(d);
printf("The robot can walk %d meters in %d ways. \n",d,count);
int walk(int distance)