You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Performs addition, subtraction, multiplication, and division on two numbers based on an operator symbol, with division-by-zero handling.
What I learned
This was my first switch, which is cleaner than chained if/else if for a fixed set of options. A leading space before %c in scanf skips a leftover newline in the input buffer. One known UX issue: dividing by zero still prints a result line after the error, because result is never assigned.