解题思路:
注意事项:
参考代码:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll ;
const ll N=1e6;
ll a[N] ;
int main()
{
int z;
cin>>z;
a[1]=1;
a[2]=1;
for(int i=3; i<=40; i++)
{
a[i]=a[i-1]+a[i-2];
}
for(int i=1; i<=z; i++)
{
cout<<a[i]<<" ";
}
return 0;
}
0.0分
1 人评分
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:757 |
C语言程序设计教程(第三版)课后习题5.8 (C语言代码)浏览:798 |
简单的a+b (C语言代码)浏览:712 |
C语言程序设计教程(第三版)课后习题9.4 (Java代码)浏览:1440 |
小明A+B (C语言代码)浏览:1302 |
1642题解浏览:778 |
神奇的fans (C语言代码)浏览:1092 |
WU-C语言程序设计教程(第三版)课后习题12.3 (C++代码)浏览:921 |
C语言程序设计教程(第三版)课后习题11.8 (C语言代码)浏览:1052 |
母牛的故事 (C语言代码)浏览:489 |