Skip to content

Instantly share code, notes, and snippets.

@10iii
Last active December 31, 2015 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 10iii/7940276 to your computer and use it in GitHub Desktop.
Save 10iii/7940276 to your computer and use it in GitHub Desktop.
<?php
function jiecheng($i) {
$s = '1';
$a = 1;
echo $s . '=' . $a . "\n";
for ($c = 2; $c <= $i; $c++) {
$s = $c . '*' . $s;
$a *= $c;
echo $s . '=' . $a . "\n";
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment