#include <iostream> #include <cstdlib> #include <stack> #include <queue> using namespace std; int main() { stack<int> s; //Construct an empty stack. s.push(10); s.push(20); s.push(30); cout << s.top() << "\n"; s.pop(); cout << s.top() << "\n"; s.pop(); cout << s.top() << "\n"; s.pop(); cout << "\n"; queue<int> q; //Construct an empty queue. q.push(10); q.push(20); q.push(30); cout << q.front() << "\n"; q.pop(); cout << q.front() << "\n"; q.pop(); cout << q.front() << "\n"; q.pop(); cout << "\n" << q.empty() << "\n"; return EXIT_SUCCESS; }