Happy New Year.
I'm working on a C++ project, which goes something like this:
for(s=1; s<=n; s++){
for (k=2; k<=n; k++) {
den[k] = 0;
den[k] = sqrt((abs(a[1][1][x]))*(abs(a[1][1][x])) + (abs(a[k][1][x]))*(abs(a[k][1][x])));
....Some magic happens here
}
}
What I cannot figure out is how to make the a[y][y][x] array add one to the third cell (i.e. it becomes a[y][y][x+1]) every time the inner loop takes place.
So, for example, let's say n = 3.
Then after the inner for loops takes place once, then add 1 to x. After it takes place again, add 1 again to x. Then the outer loop will take place, and the inner loop will start again; I want to just add another +1 again to the x. So in total, I want to add six 1's (since the inner loop will run 6 times- one for each time).
Thanks in advance.