有一只兔子,从出生后第3个月起每个月都生一只兔子,小兔子长到第三个月后每个月又生一 * 只兔子,假如兔子都不死,问每个月的兔子总数为多少?
package Practice;public class Demo { public static void main(String[] args) { // TODO Auto-generated method stub rabbit(); } public static void rabbit(){ //每个月的数等于,上两个月的和 int month=2; int[] yuef=new int[month]; yuef[0]=1; yuef[1]=1; if(month!=2&month!=1){ for(int i=0;i