My program is taking in strings such as "5.5 + 5", "sin(90)", "5^2" and so fourth. How can I categorise pieces of the string? (5 is a number and + is an operation etc) And how can I process the pieces so I can return 10.5 after "5.5 + 5"?
Here is the list of valid pieces I want in my program.
nums, decimal and negator:
1 2 3 4 5 6 7 8 9 0 . -
operations:
+ - * / ^
math commands:
sin(...) cos(...) tan(...) sqrt(...)
custom commands:
help quit
