题解 | #小乐乐走台阶#
小乐乐走台阶
http://www.nowcoder.com/practice/ebf04de0e02c486099d78b7c3aaec255
```int fib(int n)
{
if (n == 1)
return 1;
if (n == 2)
return 2;
else
return fib(n - 1) + fib(n - 2);
}
int main()
{
int n = 0;
while (~scanf("%d",&n) )
{
printf("%d", fib(n));
}
return 0;
}