Whats the error in my code

you have to push data provided by question/user into stack
but you are inserting i to the stack
this is the error
rest of code is correct

Modified Code