#include<iostream>
using namespace std;
int main(){
int f[20]={1,2};
for(int i=2;i<20;i++){
f[i]=f[i-1]+f[i-2];
}
for(int j=0;j<20;j++){
cout<<f[j]<<" ";
if((j+1)%5==0) {cout<<endl;}
}
system("pause");
}
40、求fibonacci 数列
猜你喜欢
转载自blog.csdn.net/qq_30272539/article/details/81348918
今日推荐
周排行