#include <iostream>
#include <vector>
int main() {
std::vector<std::vector<int>> matrix(3, std::vector<int>(3,0));
for(int i=0; i<3;i++){
for(int j=0; j<3;j++){
matrix[i][j] = j;
matrix[i][j] = i;
}
}
for(const auto &row : matrix){
for(const auto &elem : row){
std::cout<<elem<<" ";
}
std::cout<<std::endl;
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: