Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    number 4 rolled 15 times
    number 5 rolled 8 times
    number 6 rolled 10 times
    
  2. or download this
    my $count=0;      
    while ( (my $r = int(rand(6)) +1 ) != 6) 
    ...
         $count++;
    }
    print "took ++$count tries to get a 6\n";