Problem
Start with a pair of rabbits (one male and one female) born on January 1. Assume that all months are of equal length and that:
The first pair of rabbits reproduced two months after their own birth.
After two months of age, each pair produces a mixed pair (one male and one female), and then another mixed pair every month.
No rabbit dies.
Find out how many pairs will there be at the end of each month of the first year. Store the numbers in an array called array
.
Get hands-on with 1400+ tech skills courses.