#include "stdio.h"
main(){
int i,t1=0,t2=1,next=0;
for(i=0;i<20;++i){
printf("%d ",t1);
next = t1+t2;
t1 = t2;
t2 = next;
}
}
斐波那契数列
最新推荐文章于 2024-11-01 14:28:11 发布
#include "stdio.h"
main(){
int i,t1=0,t2=1,next=0;
for(i=0;i<20;++i){
printf("%d ",t1);
next = t1+t2;
t1 = t2;
t2 = next;
}
}