Sum stack without last element

70 views Asked by At

is there a possibility to sum up the stack without the last element? So for example if the stack has the following elements:

1 2 3 4 5

After the operation the stack should look like this:

1 14
1

There are 1 answers

1
Randy Voet On
USE: generalizations
1 2 3 4 5 datastack length 1 - nsum