JustPaste.it

Arrays in c++

hey everyone! i want to obtain multiplication with multi-dimensional arrays but i dont know the problem. my output is "1" with my code. can anybody help!
here is my code:
#include<iostream>
using namespace std;
int main() {
int a[10][10];
int j=1, i=1;
while (j < 10) {
a[i][j] = i * j;
if (i <= 10)
i++;
else {
j++;
i = 1; } }
i=1, j=1;
while (i <= 10) {
if(j <= 10) {
cout << i * j << "\t";
j++; }
else {
cout << "\n";
j=1;
i++;
}
return 0;
} }