# Create a variable to store how many random were generated at the end.
$howmany = 0;
while ($total < 100) {
$random = int(rand(13));
$howmany = $howmany + 1;
$total = $total + $random;
print " This time the special number is $random.";
if ($random > 0 and $random % 3 == 0) {
print " Lucky you!!!";
}
print "\n";
}
print " Finished: I choosed $howmany random numbers, the total is $total.\n";