See inside the black box, the value of la here is 0. In the sentence you marked, la == 0 ? 1 : la - 1, the output value is indeed 1 (because la == 0 established), but there is no place in this line to assign a value to la, so the value of la will not change and is still 0.
See inside the black box, the value of
la
here is 0. In the sentence you marked,la == 0 ? 1 : la - 1
, the output value is indeed 1 (becausela == 0
established), but there is no place in this line to assign a value tola
, so the value ofla
will not change and is still 0.la==0?1:la-1
This statement does nothing at all and needs to be changed to;
la=la==0?1:la-1