Logic errors occur when your code executes without a syntax or runtime error, but the results aren’t what you expected. An example of a logic error would be a procedure that is supposed to add sales tax to a dollar amount. On a line of code you type a minus sign instead of a plus sign, resulting in the code subtracting the amount of sales tax, rather than adding it. While the code worked, it didn’t give the result you intended.