Problem 45442. PEMDAS test (★★)

Solution 3106226

Submitted on 7 Oct 2020 by Alexandra Rubio
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x = 2; y = 1; z_correct = 4.25; assert(isequal(pemdas_test(x,y),z_correct))

2   Pass
x = 1; y = 1; z_correct = Inf; assert(isequal(pemdas_test(x,y),z_correct))

Suggested Problems

More from this Author46

Community Treasure Hunt

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

Start Hunting!