I managed to print the matrix in one loop, but how can I multiply two matrices in 2 loops (1 nested loop), please help!!
Code:#include<iostream> using namespace std; #define size 4 int main() { int M[size][size] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; int *ptrMatris = &M[0][0]; for (int i = 1; i <= 16; i++) { cout << *ptrMatris++ << " "; if (i % size == 0) cout << endl; } return 0; }