25 lines
499 B
C++
25 lines
499 B
C++
|
#include <ostream>
|
||
|
#include <queue>
|
||
|
#include <array>
|
||
|
#include <iostream>
|
||
|
|
||
|
int main() {
|
||
|
|
||
|
std::array<std::queue<int>, 3> arr_queues;
|
||
|
|
||
|
for (int j = 0; j < 5; j++) {
|
||
|
for (int i = 0; i < 3; i++) {
|
||
|
arr_queues[i].push(i+j+10);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
for (int j = 0; j < 5; j++) {
|
||
|
for (int i = 0; i < 3; i++) {
|
||
|
std::cout << "Queue numebr " << i << " " << arr_queues[i].front() << std::endl;
|
||
|
arr_queues[i].pop();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
return 0;
|
||
|
}
|