斐波那契数列PHP非递归数组实现
摘要:概念: 斐波那契数列即表达式为 a(n) = a(n-1)+a(n-2) 其中 a1 =0 a2 = 1 的数列代码实现功能: 该类实现初始化给出n,通过调用getValue函数得出a(n)的值=0) { $this->num_count = $num_count; } } public function getValue() { for($i=2; $inum_count; $i++) { $this->Fbnq_arr[$i] = $this...
阅读全文
posted @ 2014-03-08 16:38
浙公网安备 33010602011771号