need help with matrix

Hello my program crashes upon opening can some one help with that?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  #include<iostream>
using namespace std;
int main()
{
   int matrix [8][8];
   int i,j;
   for(int i=0;i<8;++i)
   {for (int j=0;j<8;++j)
   { matrix[i][j]=i;
}}
cout<< matrix[i][j];
system ("pause");
return 0;

} 
Replace the line 11 with
cout << "i=" << i << " j=" << j << '\n';
Test and think.
Topic archived. No new replies allowed.