Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


programm for factorial



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

Post New Answer

More PHP Interview Questions

How to create and destroy cookies in php?

0 Answers  


What is difference between mysql_connect and mysqli_connect?

0 Answers  


What are magic methods?

0 Answers  


How can a cross-site scripting attack be prevented by php?

0 Answers  


Write a program to find no of days between two dates in php?

0 Answers  


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?

0 Answers  


What are the special characters you need to escape in double-quoted stings?

0 Answers  


Functions in IMAP, POP3 AND LDAP?

1 Answers   Rushmore Consultancy,


HOW we can use css

3 Answers   ConSim, IPsoft,


What are the advantages of indexes in php?

0 Answers  


What is meant by PEAR in PHP?

0 Answers  


Categories