|
That is because your function now always returns i and uses i as the parameter for the call to correct(). As far as I can tell, i has nothing to do with the number of probes you have entered and has nothing to do with anything. In fact it is now always 1 as the loop always hits a break statement in the first iteration.
You should add a counter variable to your function and increment the counter every time the user enters a probe. Then just use the counter in the call to correct() and in the return.
|