diff --git "a/2101040022/chapter_5/\346\226\220\346\263\242\351\202\243\345\245\221\346\225\260.cpp" "b/2101040022/chapter_5/\346\226\220\346\263\242\351\202\243\345\245\221\346\225\260.cpp" new file mode 100644 index 0000000000000000000000000000000000000000..b128c5efe33d6fa9ef218c872f366f821572b852 --- /dev/null +++ "b/2101040022/chapter_5/\346\226\220\346\263\242\351\202\243\345\245\221\346\225\260.cpp" @@ -0,0 +1,18 @@ +#include +int fib(int m) +{ + if(m>=3) + { + return fib(m-1)+fib(m-2); + } + else{ + return 1; + } +} +int main() +{ + int n; + scanf("%d",&n); + printf("%d",fib(n)); + return 0; + } \ No newline at end of file