#include <iostream> #include <stack> using namespace std; int main() { stack <int > s; // creation s.push(1); // putting vales s.push(3); s.pop(); // removing one value cout << "elemenst at top " << s.top() << endl; // printing top value if(s.empty()) // checking { cout << "stack is empty " << endl; } else { cout << "stack is not empty " << endl; } return 0; }