I'm making a program that will answer these types of equations and show all the steps (all the work) like this:
5-3(3x4) ^2
= 5-3x12^2
=5-3x144
=2x144
=288
(That’s probably wrong just did it fast for an example)
Now I can get it to just answer 5-3(3x4) ^2 and it would give me the straight answer but what I want is the answer and all the middle stuff like this:
= 5-3x12^2
=5-3x144
=2x144
=288
Now I know I have to fallow BEDMAS, which is the order of:
Brackets
Exponents
Division
Multiplication
Addition
Subtraction
So how would I go about searching through the equation for BEDMAS and answer each one in order then go to the next?
Any suggestions or help is greatly appreciated
Thanks!