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 |
Why do we use polymorphism in php?
Tell me how can we determine whether a php variable is an instantiated object of a certain class?
Can you define an argument as a reference type?
How to remove white spaces from the beginning and/or the end of a string in php?
How do you access a get requests url parameter with php?
How do I stop php artisan serve in windows?
can any one find and tell the difference between dot net and php which one is best ? which one we get more salary? which one is stable and which one is best for freshers and also better in future and carrer ? which one we wil get more salary sir ? please send ur valuable suggestions to kiranpulsar2007@gmail.com
What are the methods to submit form in php?
Explain include(), include_once, require() and require_once?
What is zend studio for?
What are the different tables(engine) present in mysql, which one is default?
Write a php code which could be used to generate random numbers between 1 - 100 and display them on the screen.