Advertisement
Josif_tepe

Untitled

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