Ways to Cover a Distance in C
Closed this issue · 3 comments
sumana2001 commented
Given a distance ‘dist, count total number of ways to cover the distance with 1, 2 and 3 steps.
PriyanshTri commented
please explain this issue, I want to work on it. thanks
sumana2001 commented
Given a distance you have to write a program in c to count total number of ways to cover the distance with 1, 2 and 3 steps.
For example:
Input: n = 3
Output: 4
Explantion:
Below are the four ways
- 1 step + 1 step + 1 step
- 1 step + 2 step
- 2 step + 1 step
- 3 step
PriyanshTri commented
please assign this to me.thanks