The causes of logic errors
Logic errors usually result from one or some combination of the following
three causes:
- You didn't understand how the program is supposed to behave.
- You didn't understand the behavior of each operation that you wrote into
the program.
- You were careless.