5 Logic errors

Logic errors are neither syntax errors nor run-time errors. In many ways, logic errors are more difficult to spot and debug compared to syntax errors and run-time errors.

 5.1 What is a logic error?
 5.2 How to stop an infinite loop?