3.代码示例
#include<iostream> using namespace std; int main(){ long long a[31]; int i,j; a[1]=1; a[2]=1; for(i=3;i<31;i++){ a[i]=a[i-1]+a[i-2]; } for(j=1;j<31;j++){ printf("%9d",a[j]); if(j%4==0) printf("\n"); } return 0; }
4.输出结果
标签:std,示例,int,Day5,long,main From: https://www.cnblogs.com/cream867/p/17324047.html