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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is encapsulation in php?

980


How do you end a function in python?

1012


How are variables declared in php?

1017


How send email in php?

978


What percentage of websites use php?

1004


What is composer used for?

951


What is a query in php?

910


How to calculate the length of a string?

1116


What is an object in php?

1107


Explain Type hinting in PHP?

1022


What are hooks in php?

954


What is PECL?

1195


How to stop the execution of php script?

975


What is the difference between htmlentities and htmlspecialchars in php?

1026


Can we extend final class in php?

1046