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

182 Solutions

109 Solvers

Last Solution submitted on Aug 13, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers109

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!