![]() Here is my code and someone please help me: The reason why it can't solve the other equation is because of how I mapped the strings back into string array.Īfter operations does division first then left to right subtraction then addition May seem more confusing but I couldn't think of any better way. After each operation is complete the numbers and operation is replaced with the result of that equation. The reason is that each part, numbers and operations, are split to a string array. It does however solve 10 / 5 + 65 * 2 properly. My problem is solving a bigger equation such as 10 - 10 / 5 + 3. The it does work with any single operation with +, -, *, and /. The Math method does the single math operations. ![]() Im sure there is probably an easier way to do this but what I will need to change/alter is the top method of Matheq. I have the following so far which works fine.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |