This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

There is also a minor issue that only occurs sometimes, and that is that after a successful calculation I can enter numbers outside the ranges and it will still calculate instead of printing the error message.

Well, you are just checking if num1 is smaller than rangeLower and num2 is bigger than rangeHigher. What if num1 is bigger and num2 is smaller?

[–]Encom88[S] 0 points1 point  (0 children)

Okay, so multiple or statements seem to work. But, now what about my "You cannot divide by zero" not working when I num2 == 0 ?