回复 楼主 不落夕阳
public class Test2 {
public static void main(String[] args) throws UnsupportedEncodingException {
Integer lingciysqtuzi = 2;
Integer yiciysqtuzi = 0;
Integer erciysqtuzi = 0;
Integer csqtuzi = 0;
for (int i = 0; i < 12; i++) {
int yuefen = i + 1;
System.out.println("<--------" + yuefen + "月-------->");
System.out.println("--->原成熟期" + csqtuzi + "只");
csqtuzi = csqtuzi + erciysqtuzi;
System.out.println("--->新增" + erciysqtuzi + "只成熟期兔子,现有" + csqtuzi + "只");
erciysqtuzi = yiciysqtuzi;
System.out.println("--->" + erciysqtuzi + "只一月期兔子成长为二月期兔子");
yiciysqtuzi = lingciysqtuzi;
System.out.println("--->" + yiciysqtuzi + "只初生期兔子成长为一月期兔子");
lingciysqtuzi = csqtuzi;
int csduituzi = csqtuzi / 2;
System.out.println("--->" + csduituzi + "对兔子生初生期小兔子" + lingciysqtuzi + "只");
int zong = erciysqtuzi + yiciysqtuzi + csqtuzi + lingciysqtuzi;
System.out.println("--->共" + zong + "只兔子");
}
}
}