I'm not 100% sure I understand the question, but this seems OK and avoids any crashes.
#include <iostream>
using namespace std;
int main()
{
int A[10][10], row, column;
for (row = 0; row < 10; ++row)
{
for (column = 0; column < 10; ++column)
{
// avoid divide by zero
if (column != 0 && row % column == 0)
{
A[row][column] = row;
}
else
{
A[row][column] = column;
}
}
}
for (row = 0; row < 10; ++row)
{
for (column = 0; column < 10; ++column)
{
cout << A[row][column] << " ";
}
cout << endl;
}
cout << endl << endl << "press Enter to exit...";
cin.get();
return 0;
}