<?php
// The Average of Numbers
$number1 = isset($_POST['number1']);
$number2 = isset($_POST['number2']);
$number3 = isset($_POST['number3']);
// How Many Numbers are in Our Set
$numbersInSet = 3;
if(is_numeric($number1) &&is_numeric($number2)&&is_numeric($number3)){
$sum=$number1+$number2+$number3;
// Get the Sum of the Numbers
$average = $sum / $numbersInSet;
echo "The average of the three numbers you entered is<b> $average<p>";
}
?>
<form method="post">
<input type="text" name="number1" />
<input type="text" name="number2" />
<input type="text" name="number3" />
<input type="submit">
</form>
2
solved The average of three numbers