摘要: 特点:自己调用自己。 //求1+2+3的数字累加之和 $a=3; $att = $this->sum($a); public function sum($a){ $res+=$a; if($a>1){ $res+=$this->sum(--$a); } return $res;} 阅读全文
posted @ 2020-08-18 17:03 大熊童鞋 阅读(122) 评论(0) 推荐(0) 编辑