Prateek sir and coding problem run time error

https://ide.codingblocks.com/s/46042

the example test case shows correct output but the all the test case shows run time error

hey manal, what if your stack is empty but input is 1, you have to print “No Code”.

https://ide.codingblocks.com/s/51224

Hey, i am getting correct output for given sample test case but getting run time error on submitting.
Kindly help.

Hey Tanay, your code is working fine there is no run time error, you just made a little mistake, as you are supposed to print each output in new line, so update your line:36 as cout<<"No Code"<<endl;

1 Like

Thanks a lot :slightly_smiling_face: