#include<stdio.h>
int main()
{
int a=1,b=1,c=3,d;
printf("%d %d ",a,b);
while(c<=18)
{
d=a+b;
printf("%d ",d);
if(c%6==0)
{
printf("\n");
}
a=b;
b=d;
c=c+1;
}
return 0;
}
==============================================
#include<stdio.h>
int main()
{
int a=1,b=1,c=0,d;
printf("%d,%d,",a,b);
for(d=3;d<=18;d++)
{
c=a+b;
printf("%d,",c);
a=b;
b=c;
if(d%6==0)
{printf("\n");}
}
return 0;
}
#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=
本文来自博客园,作者:凡是过去,皆为序曲,转载请注明原文链接:https://www.cnblogs.com/longhai3/p/15887161.html
如有疑问,欢迎提问
#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=#+=