« Inbuilt Stack use
1#include <iostream>2#include <iomanip>3#include <algorithm>4#include <string>5#include <cstring>6#include <vector>7#include <cmath>8#include <map>9#include <climits>10#include <stack>11// climits for INT_MIN12#include <unordered_map>13using namespace std;14int main()15{16 stack<int> s1;17 s1.push(10);18 s1.push(20);19 s1.push(30);20 s1.push(40);21 s1.push(50);2223 cout << s1.size() << endl;24 cout << s1.top() << endl;25 s1.pop();26 cout << s1.top() << endl;27 cout << s1.size() << endl;28 return 0;29}