CSE Content
Pages
Home
Tuesday, 23 May 2017
Factorial calculation with calculation process representation by PHP
<?php
$input = 10;
$fact =1;
$series = '';
for($i=$input; $i>=1; $i--){
$fact = $fact*$i;
$series .= $i.'*';
}
echo substr_replace($series, '=', -1).$fact;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment