Prateek sir coading

facing problem in taking input

@ajayrajsingh_817
please tell me what problem are you facing? I will be very happy to help you.


what’s wrong in this code???

@ajayrajsingh_817
I have fixed your code. https://ide.codingblocks.com/s/242336
you were taking y and n both as the inputs. Please see the minor changes i have done.
You seems a bit confused. and why did you used a stack of pair?

becaz it occur in pair (2,78),(2,43)…
it runs for any only other than 1 in type 2(intructor query) ryt???
but in the question it is mention that instructor query is in the form of (2,something)

but you dont have to push 2 anyway
if the query is of type 1, you print st.top/ No code.
if the query is of type 2, you take another number and add that number to stack