Yes, that code will work fine. Again, as Kartoffel mentioned, the convention is that the operators follow the basic math order of operations.

Also, you should not overload your thread with irrelevant posts. Please open a new thread for new questions.