I have written a complex program, but I got stuck at some points. The program includes some calculations that are stored in 2D array eg. XXX[5][5]. I gave each raw an ID[5]={0,1,2,3,4}. The sequence of the program is as follow:
some statements & inputs ........
for (i=0; i<5; i++){
for (j=0; j<5; j++){
//HERE'S THE PROBLEM I'M FACING.. for those IDs with highest values, I want to jump the loops after giving them the values -100, so they don't compete with the new values.
//The reasons I assign -100 is because the expected values are between 5.00 and -5.00.
all my attempts have failed.
if (j == ID[i]) { // I tried (if) with (continue) but didn't work
XXX[i][j] = -100;
continue;
calculations...... stored in XXX[i][j]
}
for loop (....) // 1 more loop to determine the highest value between XXX[i][j] and give it ID[i]= i
after that some inputs will be changed in the calcualtions
}
The expected output is:
value value value -100 -100
-100 -100 -100 -100 -100
value value -100 -100 -100
value value value value value
value -100 -100 -100 -100