C语言学习之 求Fibonacci数列前40项
//#include "stdafx.h"
int main(int argc, char* argv[])
{
int f1 =1;
int f2 =1;
for(int a=0;a<20;a++)
{
printf("%d %d\n",f1,f2);
f1+=f2;
f2+=f1;
}
return 0;
}
https://img-my.csdn.net/uploads/201302/19/1361249453_8331.png
文档来源:51CTO技术博客https://blog.51cto.com/u_15316467/3311713
页:
[1]