Josif_tepe

Untitled

May 15th, 2026
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <queue>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     queue<int> q;
  8.     q.push(10);
  9.     q.push(5);
  10.  
  11.     cout << "Front element: " << q.front() << endl;
  12.     cout << "Back element: " << q.back() << endl;
  13.  
  14.     q.pop();
  15.  
  16.     cout << "Front element after pop: " << q.front() << endl;
  17.     return 0;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment