- or download this
use strict;
use warnings;
...
printf "% 4u % 10u %5.2f\n",
$i, $triangle[$i+1], 100*$triangle[$i+1]/$runs;
}
- or download this
$ time perl 892293.pl
Name "main::a" used only once: possible typo at 892293.pl line 21.
...
real 0m0.034s
user 0m0.024s
sys 0m0.012s
- or download this
$ time perl 892293.pl
Name "main::a" used only once: possible typo at 892293.pl line 21.
...
real 0m0.034s
user 0m0.028s
sys 0m0.004s
- or download this
use strict;
use warnings;
...
for (my $i = 0; $i < $numTosses+1; $i++) {
print "$i\t$triangle[$i+1]\t",100*$triangle[$i+1]/$runs, "\n";
}