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 can you get web browser’s details using PHP?
How to turn on the session support?
What is a comment in php?
When you will get the error "Cannot add header information"?
What is php used for?
How long will it take to learn php?
Explain what is the difference between for and foreach?
what will do ceil() and floor() in PHP?
How can we extract string 'techinterviews.com' from a string 'http://www.techinterviews.com' using regular expression in PHP?
What is namespace and use in php?
Write a program to display table of a number using php?
Is laravel better than codeigniter?