rendered paste body<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<?php
if (isset($_POST['rayon']) && isset($_POST['hauteur'])) { $volume = volume($_POST['rayon'], $_POST['hauteur']); }
{
function volume($rayon, $hauteur)
{
$volume=$rayon*$rayon*3.14*$hauteur*(1/3);
return $volume;
}
$volume = volume($_POST['rayon'], $_POST['hauteur']);
echo "Le volume du cone est de $volume";
}
else
{
echo <form method="post" action="calcul.php">;
echo <p>Rayon<input type="text" name="rayon"/></p>;
echo <p>Hauteur<input type="text" name="hauteur"/></p>;
echo <input type="submit" value="Calculer"/>;
echo </form>;
}
?>
</body>
</html>