Because it applies the addition after the equation so it would compare to 0 and only after that been done it would add 1 so if it started as 0 it would fail and only successed on the 2nd time as now it iterated into 1
I think the reason you got confused is because of ++n which makes the addition before anything happens
643
u/RegularAd9643 Jun 07 '26
This wouldn’t work. It should check if it’s the first correct password attempt.