Number of rabbit

Title: bunny has grown into one pair of young rabbits, young rabbits after one month, one month after the bunny rabbit and grown into birth to young rabbits, a few months later and asked how many rabbits, young rabbits, bunny, into a rabbit were much right.

This time we have to analyze the law of the growth of the rabbit:
Growth pattern
So we can see that
large = large + small; // this month into rabbit
small = young; // this month bunny
young = large; // this month, young rabbits

Now the number of the number of rabbits can calculate it! Loop output for use in the console of the rabbit
The number of rabbits

i <= ?; this? the month,? is the output of a few months for the rabbit on the month.

Guess you like

Origin blog.csdn.net/weixin_45027266/article/details/91493991