Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Holiday parcel puzzle

by cavac (Parson)
on Dec 22, 2011 at 17:42 UTC ( [id://944817]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. 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";
    
  2. 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";
    
  3. 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.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://944817]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-29 09:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found