$minimum) {
if ($number <= 10000 AND $number > 0) {
print ("Scroll down to the bottom to view the results and calculations.\n
");
$headsheads = 0;
$headstails = 0;
$number = abs($number);
for ($i = 0; $i < $number; $i++) {
$randNum = rand($minimum,$maximum);
print ("$randNum");;
$randNum2 = rand($minimum,$maximum);
print ("$randNum2 | \n");
if ($randNum + $randNum2 == 0) {
$headsheads++;}
if ($randNum + $randNum2 == 1) {
$headstails++;}
$randNum = 0;
$randNum2 = 0;
}
$tailstails = $headstails + $headsheads;
$tailstails = $number - $tailstails;
$percentHH = ($headsheads / $number) * 100;
$percentHT = ($headstails / $number) * 100;
$percentTT = ($tailstails / $number) * 100;
$totalHeads = $total;
$totalTails = $number - $total;
$ratioTTTHHH = "$headsheads : $headstails : $tailstails";
$ratioHT = "$totalHeads : $totalTails";
print ("
\nWhere Heads = a 0, and Tails = a 1\n
Total Heads Heads: $headsheads ($percentHH%)\n
Total Heads Tails: $headstails ($percentHT%)\n
Total Tails Tails: $tailstails ($percentTT%)
\n");
} else {print ("Please enter a valid number of numbers.");}
} else {print ("Please enter appropriate maximum and minimum numbers.");}
} else {print ("Please enter a valid minimum.");}
} else {print ("Please enter a valid maximum.");}
?>