Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <list>
- using namespace std;
- int main()
- {
- list<list<int>> l;
- list<int> a;
- int len = 3;
- for (int i = 0; i < len; i++)
- {
- for (int j = 0; j < len; j++)
- {
- int temp;
- cin >> temp;
- a.push_back(temp);
- }
- l.push_back(a);
- a.clear();
- }
- for (list<list<int>>::iterator i = l.begin(); i != l.end(); i++)
- {
- for (list<int>::iterator j = (*i).begin(); j != (*i).end(); j++)
- {
- cout << *j << " ";
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement