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

195 Solutions

120 Solvers

Last Solution submitted on Aug 15, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers120

Suggested Problems

More from this Author40

Problem Tags

Community Treasure Hunt

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

Start Hunting!