The rules of programming follow the same rules as maths in terms of the order in which operators are carried out. Operators in brackets are carried out first, then orders like powers and roots, then ...