https://ide.codingblocks.com/s/364615 prateek sir and coding is not passing test cases
Prateek sir and coding
check now->
#include<iostream>
#include<stack>
using namespace std;
int main()
{
int Q;
cin>>Q;
stack<int>s;
for(int i=0;i<Q;i++)
{
int a;
cin>>a;
switch(a)
{
case 1:
if(!s.empty())
{
cout<<s.top()<<endl;
s.pop();
}
else
{
cout<<"No Code\n"; // added \n
}
break;
case 2:
int cost;
cin>>cost;
s.push(cost);
break;
}
}
}
