ITPub博客

首页 > 应用开发 > > 为什么程序一运行就这样了

为什么程序一运行就这样了

作者:deeply 时间:2019-10-25 15:18:05 0 删除 编辑

为什么一运行就出现press any key to continue

这是源代码

#include<iostream>

#include<cmath>

using namespace std;

int main()

{

int A,B,n,f[100000000],i;

while(cin>>A>>B>>n)

{

if(A==0&&B==0&&n==0)

break;

else

{

f[0]=1;f[1]=1;

for(i=2;i<n;i++)

f[i]=A*f[i-1]+B*f[i-2];

cout<<f[n-1]<<endl;

}

}

return 0;

}

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1978/viewspace-3137033/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-05-30

  • 博文量
    215
  • 访问量
    24534