Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Adding 2 + 2

by ikegami (Pope)
on Jul 22, 2005 at 15:47 UTC ( #477263=note: print w/replies, xml ) Need Help??


in reply to Adding 2 + 2

$lterm = 2; # lterm = 2 $rterm = 2; # rterm = 2 $#add = $lterm; pop(@add); # add = lterm push(@acc, @add); # acc += add $#add = $rterm; pop(@add); # add = rterm push(@acc, @add); # acc += add push(@acc, 1); $sum = $#acc; # sum = acc print("$sum\n");

It must be fast, since the addition is done by push, which is written in C! ;)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://477263]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2016-12-02 20:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (50 votes). Check out past polls.