Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int find_ways(int n){
- if(n == 0) return 1;
- if(n==1 || n==2 || n ==3 )
- return 1;
- return find_ways(n-1) + find_ways(n-4);
- }
- int main(void) {
- int N =5;
- printf("%d", find_ways(N));
- // your code goes here
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement