echo"LUAS LINGKARAN";
echo"<br>";
echo"
<form method='post' action=''>
Jari-Jari:
<input name='jari' type='text' size='5'>
<input name='hitung' type='submit' value='luas'>
</form>
";
if($_POST[hitung])
{
$jari=$_POST[jari];
if($jari%7==0)
{$hasil= ($jari*$jari)*22/7;}
else
{$hasil= ($jari*$jari)*3.14;}
}
echo"LUAS LINGKARAN ADALAH $hasil";
?>
No comments:
Post a Comment