When asking about code
Don't ask others to debug your broken code without giving a hint what sort of problem they should be searching for. Posting a few hundred lines of code, saying "it doesn't work", will get you ignored. Posting a dozen lines of code, saying "after line 7 I was expecting to see <x>, but <y> occurred instead" is much more likely to get you a response.
I revise again this code.but I'dont see any problem.I think have a problem on my computer or compiler. please Will you compile or try on your computer ?. thanks
Not without you telling me what the problem is. Are you getting a compiler error? Does the program crash? Or is it just not behaving as expected?
Be specific about what the problem is. I don't know what this program is supposed to do or how it's supposed to do it. I'm not about to invest my time trying to figure out what the problem is on top of trying to figure out how to solve that problem.
The other problem is that in your Stack, push should be st[top++] = var; and pop should be return st[--top];. Also you should test for overflow/underflow.