#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector <vector<int>> matrix = {
{1,2, 3},
{4, 5, 6}, // can make it {4, 5}
{7, 8, 9} // can make it {6}
};
for(int i=0; i<matrix.size(); i++) {
for(int j=0; j<matrix[i].size(); j++) {
cout << matrix[i][j] << " ";
}
cout << endl;
}
return 0;
}
No comments:
Post a Comment