I don't know why the first test data is like that...

Code: Select all
4
1 2 3 4
0 -2 -6 -12
Program 1
DUP DUP MUL SUB

_____________________
Moderator: Board moderators
Code: Select all
4
1 2 3 4
0 -2 -6 -12
Program 1
DUP DUP MUL SUB
Code: Select all
1 <- Initially
1 1 1 <- After two DUPs
1 1 <- Multiply the top 2 entries
0 <- Subtraction of the 2 entries
Code: Select all
2 <- Initially
2 2 2 <- After two DUPs
2 4 <- Multiply the top 2 entries
-2 <- Subtraction of the 2 entries