Here is the function causing the trouble - I am trying to clean it up and make it more efficient/easier to read. When I make a change in the conditional statement it zeros the global variable
by global - I mean it is declared by the statement
outside of any function, then set inside another function by the statement
display(); // prints out mins, secs and cent - it does not change them.
if(timeToRun>100) // go round the function again - this causes the trouble
else // leave the loop - countdown completed - this works all the time
// alternative comparison that is less efficient but works! (cent>10 || secs!=0 || mins!=0)
Any suggestions much appreciated.
Still thinking and still very puzzled, but putting this together has helped a little.