Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <queue>
- using namespace std;
- int main() {
- string line;
- getline(cin, line);
- queue<string> names;
- while (line != "End") {
- if (line == "Paid") {
- while (!names.empty()) {
- cout << names.front() << endl;
- names.pop();
- }
- }
- else {
- names.push(line);
- }
- getline(cin, line);
- }
- cout << names.size() << " people remaining.\n";
- return 0;
- }
Advertisement
Comments
-
- valorant skin changer
- https://www.youtube.com/watch?v=NNqGm3ZclZM
Add Comment
Please, Sign In to add comment
Advertisement