OperationGuys my noob brain is having issues following this simple order of operation, would anybody be kind enough to enlight me on how is the computer handling this order of operation?.
Running this on Unity it throws the result printed on the book, but as simple as the operation maybe I cannot see how the computer is doing the operation.
CodePudding user response:
you have to first learn the mathematics BODMAS rule and how the precedence works. Refer to this.
Now coming to your question.
it will become 5 1/2.
1/2 will become 0 because both the numerator and denominator are int.
and 5 0 is 5