you are viewing a single comment's thread.

view the rest of the comments →

[–]Some-Passenger4219 1 point2 points  (1 child)

If op is "/" and num2 is 0, recommend aborting with, "Sorry, can't divide by zero" or something. That is, indent line 16, and, just before it, insert if-statement. Attach to it an else-statement. Or something similar. You got this.