Josif_tepe

Untitled

Jul 25th, 2025
788
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <iostream>
  2. #include <queue>
  3. using namespace std;
  4.  
  5. int main() {
  6.    
  7.     queue<int> q;
  8.    
  9.     q.push(1);
  10.     q.push(2);
  11.     q.push(3);
  12.     q.push(4);
  13.     q.push(5);
  14.    
  15.     while(!q.empty()) {
  16.         cout << q.front() << endl;
  17.         q.pop();
  18.     }
  19.     return 0;
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment