Odpowiedź :
Odpowiedź:
#include <iostream>
#include <vector>
using namespace std;
int main(){
srand(time(NULL));
vector<int> historia = {};
int x;
while (true){
x = rand() % 10;
if (x==0){
for (int& element : historia){
cout << element << " ";
}
cout << endl;
historia.clear()
} else {
historia.push_back(x)
}
}
}