Ok, you seem to be slowly cathing the concept. The one problem that you have with the code up here is that you're placing (and for the record, "pushing" something in a stack is not placing it on top...) the result back on top of the stack. You don't want to do this. After the initial operation, you then want to pop the remaining element of the stack one at a time and execute the corresponding operation with the result of the previous operation. You then repeat this process until the stack is empty. Then you can output the result.