Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <list>
- using namespace std;
- int main(int argc, char *argv[])
- {
- list<list<int>> listoflist;
- for (int i=0; i<3; i++){
- list<int> templist;
- for (int j=0; j<3; j++){
- templist.push_back(rand()%10);
- }
- listoflist.push_back(templist);
- }
- bool b=true;
- for(auto& a : listoflist)
- {
- for (auto&n:a){
- cout << n << " ";
- if (n%2) {
- b=false;
- //break;
- }
- // if (!b) break;
- }
- cout << endl;
- }
- cout << (b?"Yes":"No") << endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment