Home > Back-end >  This is my electricity in hangzhou. To solve the problem. Don't know what is the meaning of thi
This is my electricity in hangzhou. To solve the problem. Don't know what is the meaning of thi

Time:09-27

Seek help from bosses,
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 subscript
for(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
  • Related