Home > Back-end >  Consult m result how to calculate
Consult m result how to calculate

Time:10-03

Forget it several times, as a result, m - 2, I don't know what went wrong, please everyone a great god disambiguation, grateful

CodePudding user response:

Each big circulation of the end of the last I m is different, is the first time - 4, second, third - 2 so fifth is 0

CodePudding user response:

Can set breakpoints, step to see the value of m

CodePudding user response:

The last time I cycle, I==5,
Last cycle, j j==5
So m=I + j=5 + 5=0

CodePudding user response:

Inside the outer for loop execution five times, each time the for loop to perform 6 times, a total of 30 times,
The last time the for loop, I was 5, j is - 5, add up to zero

CodePudding user response:

Real or under your broken so that can see it clearly point.

CodePudding user response:

The breakpoint to track what all understand, don't know come here to ask what meaning,

CodePudding user response:

Everybody seems to be didn't notice every time j 2

CodePudding user response:

I noticed that - 2, but this matter? Simpler procedure, a tracking or adding more print what all understand, namely 1, 2 minutes

CodePudding user response:

It is reduced by 2, because every time j j cycle is 6 times, or j will cycle 11
  • Related