programm for factorial
Answer / koushikgraj
<?php
function get_factorial_value($val)
{
$fact=1;
for($i=$val;$i>=1;$i--)
$fact=$fact*$i;
return $fact;
}
get_factorial_value(6);
?>
| Is This Answer Correct ? | 10 Yes | 1 No |
How to create and destroy cookies in php?
What is difference between mysql_connect and mysqli_connect?
What are magic methods?
How can a cross-site scripting attack be prevented by php?
Write a program to find no of days between two dates in php?
How many ways can we get the value of current session id?
3 Answers Infosys, L&T, SysBiz, Torque Infotech,
What is the difference between implode() and explode() in php?
What are the special characters you need to escape in double-quoted stings?
Functions in IMAP, POP3 AND LDAP?
1 Answers Rushmore Consultancy,
HOW we can use css
What are the advantages of indexes in php?
What is meant by PEAR in PHP?