How to solve the problem of breeding Rabbit by PHP
This article mainly introduces PHP how to solve the problem of breeding rabbits, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Breeding rabbit
$month = 12; $fab = array (); $fab [0] = 1; $fab [1] = 1; for ($I = 2; $I < $month; $iTunes +) {$fab [$I] = $fab [$I-1] + $fab [$I-2];} for ($I = 0; $I < $month; $iTunes +) {echo sprintf ("{% d} month rabbit: {% d}", $I, $fab [$I]). " } Thank you for reading this article carefully. I hope the article "PHP how to solve the problem of breeding rabbits" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!