PHP tutorial || Learn PHP
Ask Your Question By Comment We Will Give You Better Solution Soon
Thursday, 23 January 2014
Find Factorial No
<?php
$num=5;
$fact = 1;
for($i = 1; $i <= $num ;$i++)
$fact = $fact * $i;
echo $fact;
?>
Output: 5*4*3*2*1= 120
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment