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 |
What is the difference between the functions strstr() and stristr()?
What are constructor and destructor in PHP?
Is php 5 still supported?
Do you know what is php?
What is meant by public, private, protected, static and final scopes?
What is session management php?
What is the use of mysql_fetch_assoc in php?
What is the difference between md5(), crc32() and sha1() crypto on php?
what is php?
I created a cookie with the value like '1A2A',now i want to update this value regularly (about 20 times in a minute) with the value '1A2A3A' , 3A is the new value,new value will vary on the request it may be 3A or 4A or 100A ,some times the cookie is updating with new value but not every time.Can any body suggest the solution
What does PHP stand for?
What is the sign to start variables in PHP?