/ Published in: PHP
Easy but powerful.
Expand |
Embed | Plain Text
<?php function sum($from, $to){ if ($from == $to) { return $from; } return $to + sum($from,$to-1); } ?>
You need to login to post a comment.
Easy but powerful.
<?php function sum($from, $to){ if ($from == $to) { return $from; } return $to + sum($from,$to-1); } ?>
You need to login to post a comment.