Reverse a stack using recursion

https://hack.codingblocks.com/contests/c/588/418
https://ide.codingblocks.com/s/69122

why it does not produce any output?
please rectify it

Hi Preesh
Your code is giving the output 3 for the input 3 2 1. This is because of the first if condition in the reverse function. You cannot put a condition on the type of number that is being entered into the stack.

Try to think of a different approach.