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

36 Solutions

24 Solvers

Last Solution submitted on Jun 19, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers24

Suggested Problems

More from this Author36

Problem Tags

Community Treasure Hunt

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

Start Hunting!