Below is the topic and my code,
CodePudding user response:
for(int i=0; Coutn<=N; I++)This is wrong
CodePudding user response:
The for loop itself can't say the wrong, wrong is wrong wrong in the array subscriptfor(int i=1; Coutn<=N; I++) {
The scanf (" % d ", & amp; Fen] [I - 1);//I starting from 1 cycle no problem, the problem is that the array subscript starting from 0, so the array to use I - 1
}
Or to start from 0 I cycle
for(int i=0; Coutn & lt; N. I++) {
The scanf (" % d ", & amp; Fen [I]);
}
Find the scores for loop is also the same problem, modify it by
CodePudding user response:
Ok, thank you