Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
sum of continues arrayby sanku (Beadle) |
on Sep 10, 2008 at 05:01 UTC ( [id://710268]=perlquestion: print w/replies, xml ) | Need Help?? |
sanku has asked for the wisdom of the Perl Monks concerning the following question:
hi monks,
Can any one give suggestion on the following one.
I am having an array like this
@array=(1,2,3,4,-1,-2,-3,11,12,13);
i want to take the sum of only positive continues number and i have 2 display the maximum sum of that array.
Thanks in advance.
Back to
Seekers of Perl Wisdom
|
|