A robot can take steps of 1 meter, 2 meters, or 3 meters. Write a recursive function to calculate the number of ways the robot can walk n meters. (n is an integer obtained from user.) As example:
Please input the distance that the robot will walk:
4
There are 7 ways to walk 4 meters with steps of 1 meter, 2 meters, and 3 meters. (The seven ways are: 1,1,1,1 or 1,1,2 or 1,2,1 or 2,1,1 or 2,2 or 1,3 or 3,1)