Question: 4.13 Climbing a Ladder Write a recursive function that will calculate the number of ways you can climb a ladder with n rungs. You can

4.13 Climbing a Ladder Write a recursive function that will calculate the number of ways you can climb a ladder with n rungs. You can either climb one rung, or two rungs at a time. The function must be recursive, no loops are allowed. Examples Input of 2 will return 2 because you can climb the ladder 1 rung + 1 rung or 2 rungs at once Input of 3 will return 3 because you can climb the ladder 1 rung + 1 rung + 1 rung, 1 rung + 2 rungs, or 2 rungs + 1 rung Input Do not read in input! There will be no input read in anymore. Going forward use the hard-coded input on the template and ensure the program works. There will be one compare output test based on the hard-coded input. The rest of the tests will be unit tests. Output Print the result from your function LAB ACTIVITY 4.13.1: Climbing a Ladder 013 J Downloadable files main.cpp Download main.cpp Load default template... 1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
