- or download this
#!/usr/bin/perl
use strict;
...
# print out the end result in percent
print "You were lucky " . int($luck * 100 / $runs) . "% of the time st
+icking to your initial decision.\n";
- or download this
#!/usr/bin/perl
use strict;
...
# print out the end result in percent
print "You were lucky " . int($luck * 100 / $runs) . "% of the time ch
+anging your decision.\n";
- or download this
You were lucky 33% of the time sticking to your initial decision.
You were lucky 66% of the time changing your decision.