
Build a postfix calculator: read a single argument containing integers and operators separated by spaces, evaluate it stack-style, and print the final value.
./rpn "3 4 +"Expected result
7For your own tracking. Tests grade your code.
./rpn "5 1 2 + 4 * + 3 -"Expected result
14./rpn "5 0 /"Expected result
ErrorExpected files
rpn.cAllowed functions
write
v0.40: Create exercises. Challenge the community.
Meet Studio →Build a postfix calculator: read a single argument containing integers and operators separated by spaces, evaluate it stack-style, and print the final value.
./rpn "3 4 +"Expected result
7For your own tracking. Tests grade your code.
./rpn "5 1 2 + 4 * + 3 -"Expected result
14./rpn "5 0 /"Expected result
ErrorExpected files
rpn.cAllowed functions
write
Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.