Multiplying 3x3 matrices in C++
<p>I'm working on a program to multiply two 3X3 matrices together. I have hit a few problems and I can't figure out the problems. Any help would be appreciated :D</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

int main(){

int matrix1[3][3] = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };
int matrix2[3][3] = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };
int results[3][3];
int product = 0;
int i;
int j;

for (i = 1; i &lt;= 3; i++){
    for (j = 1; j &lt;= 3; j++){
        product += matrix1[i][j] * matrix2[j][i];
        cout &lt;&lt; product &lt;&lt; endl;
    }
    results[i][j] = product;
    product = 0;
}

cout &lt;&lt; endl &lt;&lt; "Output Matrix: " &lt;&lt; endl;

for (int i = 1; i &lt; 4; i++){
    for (int j = 1; j &lt; 4; j++){
        cout &lt;&lt; results[i][j];
    }
    cout &lt;&lt; endl;
}


system("pause");
return 0;
}
</code></pre>

<p>And this is the result I get out of it:</p>

<pre><code>25
73
-1717986851
48
129
-858993331
-1867771963
1566576709
1595991863

Output Matrix:
-858993460-858993460-858993460
-1717986851-858993460-858993460
-85899333112
Press any key to continue . . .
</code></pre>

<p>Thanks again in advance! :D</p>