Cody

Problem 45442. PEMDAS test (★★)

Solution 2215735

Submitted on 17 Apr 2020 by Rafael Hernandez-Walls
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))

ans = 4.2500

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

ans = Inf

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!