#include <iostream>
using namespace std;
int main()
{
const auto rows = 3;
const auto cols = 4;
// allocate
auto arr = new double[rows][cols];
// set values
for (int i = 0; i < rows; i++)
{
for (int j = 0; j < cols; j++)
arr[i][j] = i + j;
}
// print values
for (int i = 0; i < rows; i++)
{
for (int j = 0; j < cols; j++)
cout << arr[i][j] << " ";
cout << endl;
}
// free memory
delete[] arr;
return 0;
}
/*
run:
0 1 2 3
1 2 3 4
2 3 4 5
*/