爬楼梯 C++

// write your code here
int one = 0;
int two = 1;
while(n>0) {
two=one+two;
one=two-one;
n--;
}
return two;

posted @ 2017-03-07 23:01  tong-joker  阅读(362)  评论(0编辑  收藏  举报