//需求:有一对兔子,从出生后第三个月起每个月都生一对兔子,小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死,问:第二十个月兔子的数量为多少 public class HelloWorld { public static void main(String[] args){ int arr[] = new int[20]; arr[0] = 1; arr[1] = 1; for(int x = 2; x < arr.length;x ++){ arr[x] = arr [x-2] + arr[x-1]; } System.out.println(arr[19]); } }