Outline
Factorial of a no.
Factorial of a no.
<!DOCTYPE html>
<head>
<title> Factorial No.</title>
</head>
<body>
<form action=""method="post">
Enter a no. : <input type="text"name="ok">
<input type ="submit" name="ok">
</form>
</body>
</html>
<?PHP
if(isset($_post ("ok"))){
$var=$_post["no"];
$fact=i;
for ($i=1; $i<=$var; $i++)
{
factor*=$i;
}
echo"Factorial is=$fact";
}
?>