Does not follow order of operations

Issue #6 new
Former user created an issue

Conventional order of operations says that 5+(5-2)*8 is 29; however, the game claims it is 64. Either you are using a non-standard convention, or there is a logic error in your code.

Comments (1)

  1. Przemyslaw Rzepecki repo owner

    Hi,

    Thanks for reporting the issue. Yes the game evaluate operators from left to right, taking only the parenthesis into consideration. That way is more intuitive (at least for me).

    I will consider this in a newer version, maybe its good to use explicit parenthesis like (5+(5-2))*8 or some tree based representation.

  2. Log in to comment