i've been working on an assignment to create a certain stochastic test, everything was going great until I had to make a loop tp represent a double summation
int A[][6] = { {4529,9045,13568,18091,22615,2789},
{9045,18097,27139,36187,45234,55789},
{13568,27139,40721,54281,67825,83658},
{18091,36187,54281,72414,90470,111580},
{22615,45234,67852,90470,113262,139476},
{27892,55789,83658,111580,139476,172860} };
float B[] = { 1 / 6,5 / 24, 11/120, 19/720, 29/5040, 1/840 };
float R = 0, temp1 = 0, temp2, temp3;
for (int i = 0; i < 6; i++) {
for (int j = 0; i < 6; j++) {
temp2 = r[i] - (n * B[i]);
temp3 = r[j] - (n * B[j]);
temp1 += (A[i][j]*temp2*temp3);
}
}
R = temp1 / n;
cout << "R= " << R;
r is an array of length 6 I defined previously in the program
the last 2 lines produce nothing even though there aren't any error, I tried to replace them with merely couting anything still nothing