Skip to content

Instantly share code, notes, and snippets.

@10iii
Last active Dec 31, 2015
Embed
What would you like to do?
<?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