ScratchData LogoScratchData
Back to MasterOfArithmetic's profile

Shunting-yard algorithm

MAMasterOfArithmetic•Created April 19, 2014
Shunting-yard algorithm
2
0
91 views
View on Scratch

Instructions

Enter a math problem. Instead of putting negative numbers, please put instead (0-x), in parenthisis

Description

This uses the Shunting Yard Algorithm and postfix notation to solve any problem, even with parenthesis, with just one script to actually solve it! And, you don't need to use spaces. Although, I haven't added exponents to this one YET. I will, though! It displays what you entered (blue), the problem in postfix under it, and the answer under the equal sign. Credit to @Zro716 for the suggestion on this. I learned how to solve problems using this on Wikipedia. Try 4*(3+(7-4))

Project Details

Project ID20956679
CreatedApril 19, 2014
Last ModifiedJune 3, 2014
SharedApril 19, 2014
Visibilityvisible
CommentsAllowed