<?
header("Content-type: text/plain");
$countTotal = 52;
$countKind = 13;
$chance = 1;
for(;;) {
if( ++$i > 10 ) break;
printf("Cards in pool: %u\n", $countTotal);
printf("Cards of correct color: %u\n", $countKind);
$fraction = $countKind / $countTotal;
printf("Odds %u / %u = %.5f\n", $countKind, $countTotal, $fraction);
$countKind--;
$countTotal--;
$chance*= $fraction;
printf("Total chance of single color: %.20f\n\n", $chance);
}

