Re: [GENERAL] Running Total with a Set Maximum

2010-09-01 Thread Peter Hunsberger
On Wed, Sep 1, 2010 at 5:20 AM, Paul Newman wrote: > Hi, > Could someone out there help me. > Given the following set of values > +3 > +3 > 0 > +3 > +3 > -3 > 0 > +3 > > I want to have a maximum sum of 6 at any one point , in other words I want > the following > > > +3  --  3 > +3  --  6 > 0   -- 

[GENERAL] Running Total with a Set Maximum

2010-09-01 Thread Paul Newman
Hi, Could someone out there help me. Given the following set of values +3 +3 0 +3 +3 -3 0 +3 I want to have a maximum sum of 6 at any one point , in other words I want the following +3 -- 3 +3 -- 6 0 -- 6 +3 -- 6 +3 -- 6 -3 -- 3 0 -- 3 +3 -- 6 How can I do this ? Thank you