There's more than one way to do things | |
PerlMonks |
Re^6: How do I write a program that calculates the sum of all numbers to a number, n?by Tux (Canon) |
on Feb 25, 2015 at 11:20 UTC ( [id://1117817]=note: print w/replies, xml ) | Need Help?? |
say [+] ^$n,$n
(You do not want to change $n, so ++ is out of the question) Also note that currently $n cannot be a native int when using ++, though that will be fixed.
Enjoy, Have FUN! H.Merijn
In Section
Seekers of Perl Wisdom
|
|