Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^3: do while loops

by Anonymous Monk
on Jan 08, 2008 at 13:06 UTC ( #661076=note: print w/ replies, xml ) Need Help??

in reply to Re^2: do while loops
in thread do while loops

sum = 0; for (x = 1; x <= 5; x++) { printf("%d", x); sum = sum + x; printf("The sum is %d", sum); }

Comment on Re^3: do while loops
Replies are listed 'Best First'.
Re^4: do while loops
by f00li5h (Chaplain) on Jan 10, 2008 at 05:54 UTC

    for(;;) loops are ick... they tend to lead to unneeded subscripting and other pesky things

    for my $x (1..4) is far less intent-obfuscated-by-code looking (as far as i see it anyway)

    wait, is that C?

    @_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://661076]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2015-10-06 19:25 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (159 votes), past polls