5兔子产子

#include <iostream>
using namespace std;
int main(){
int a,b,c,i,couts=0;
a=1,b=1;
cout<<a<<endl<<a<<endl;
for(i=3;i<=30;i++){
c=a+b;
cout<<c<<endl;
a=b;
b=c;
couts++;
}
cout<<couts;
return 0;
}

posted @ 2023-04-22 21:10  几条小鱼  阅读(22)  评论(0)    收藏  举报