Numerical Expressions

In programming, we can calculate numerical expressions, for example:

var expr = (3 + 5) * (42);

The standart rule for priorities of the arithmetic operations is applied: multiplying and dividing are always done before adding and substracting. In case of an expression in brackets, it is calculated first, but we already know all of that from school math.

results matching ""

    No results matching ""