1.Using the '=', instead of '= =' to determine if two values are equal
2.Divide by zero ✓ Correct
3.Failing to initialize counter and total variables before the body of loop
4.Using commas instead of two required semicolon in a for loop header
Solution
"Divide by zero" is NOT a logical error it is runtime error.
Runtime errors: These occur when the program is running and something goes wrong.
For example,
- If the program tries to divide a number by zero,
- If it tries to access a memory location that is not accessible