Make a calculator by the four main operators (op):
+
-
*
/
And the two numbers (n1, n2).
Don't forget to check to division on zero, make result (rslt) = "No division on zero"!
You can use switch case.
If the operator is not from the four main operators, make rslt = "Unsupported operator".

Solution Stats

13 Solutions

5 Solvers

Last Solution submitted on May 31, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers5

Suggested Problems

More from this Author30

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!