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
Solution Comments
Show comments
Loading...
Problem Recent Solvers5
Suggested Problems
-
5 Solvers
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!