Created
March 6, 2016 16:52
-
-
Save aa-ahmed-aa/203741818f662a8fc3cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <queue> | |
using namespace std; | |
int main() | |
{ | |
queue<int> List; | |
int var; | |
cout << "Please enter Int (enter 0 to end): "<<endl; | |
do { | |
cin >> var; | |
List.push(var); | |
} while (var); | |
cout << "myqueue contains: "; | |
while (!List.empty()) | |
{ | |
cout << ' ' << List.front(); | |
List.pop(); | |
} | |
cout << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment