#include #include using namespace std; int main() { //two dimensional (2D) array of doubles double M[5][7]; //Let's initialize all matrix values for (int r = 0; r < 5; r++) for (int c = 0; c < 7; c++) M[r][c] = 0; M[2][5] = 3.14; M[3][6] = 8.9; M[1][4] = 14.2; M[0][0] = 1.8; //Let's loop through them all... for (int r = 0; r < 5; r++) { for (int c = 0; c < 7; c++) { cout << M[r][c] << " "; } cout << endl; } return 0; }