急求一个c语言程序 有题目 有50行左右

来源:百度知道 编辑:UC知道 时间:2024/06/04 04:24:52
最好用到if语句

从前有一对兔子,它们每一个月生一对兔子,新生的小兔子
两个月就张大了,在第二个月的月底开始生它们的下一代小兔子,这样一代一代生下去,求解兔子的增长数量的数列。

#include<stdio.h>
void main()
{
int n,i,j,un1,un2,un;
clrscr();
puts("********************************************************");
puts("* This is a program to Calculate Rabbits Numbers. *");
puts("* There is a rabbit couple procreats 2 rabbits 1 month,*");
puts("* and the young rabbits group and can procreats in the *");
puts("* end of the second month. In this way,how many rabbits*");
puts("* are there after n generations? *");
puts("********************************************************");
for(n=2;n<3;)
{
printf(" >> Please input number of generations (n>2): ");
scanf("%d",&n);
if(n<3) printf("\n >> Input