Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: NEWBIE Brain Teaser

by spacewarp (Pilgrim)
on Apr 15, 2001 at 03:53 UTC ( [id://72636]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to NEWBIE Brain Teaser

I think that the points about printing an explanation for the results are valid, but I would recommend taking it a step further. Since these teasers have a non-obvious result, I think people would also like to see code that does give the answer that was originally expected. In this case, for instance, how to modify the code so that it prints "1 2 3 4 5". After all, I'm sure we've all experienced the frustration of bugs in our logic; for a newbie the frustration would be worse.

Spacewarp

DISCLAIMER:
Use of this advanced computing technology does not imply an endorsement
of Western industrial civilization.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://72636]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.