#include "stdafx.h"#include<iostream>using namespace std;
int _tmain(int argc, _TCHAR* argv[]){ int a,b,c=1; int m[8]; cout<<"输入台阶数"; cin>>a; m[0]=1,m[1]=2; for(b=2;b<a;b++){ m[b]=m[b-1]+m[b-2]; c++;} cout<<m[c]; }