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 |
Which php framework is best for beginners?
Can php run without apache?
How do I repair phpmyadmin?
What is the scope of career in PHP/Mysql
What is the use of 'print' in php?
What is difference between required and include in php?
When you will get the error "Cannot add header information"?
How to fix "headers already sent" error in php
What is member variable?
Questions on OOP concepts 1. What are the access specifiers available in php ? Explain 2. What is object cloning ? 3. What are the differences between interface and abstract class ? 4. What is overloading ? 5. What is overriding ? 6. How to prevent function overriding ? 7. What is the use of "final" keyword ? 8. What is static variable ? How will access a static variable ? What is static class ?
What is php programming used for?
How to read one character from a file?