Electrical and Computer Engineering
31 of 48
UAH
CPE 112
Precedence Examples
•Expression Value
•  10 / 2 * 3 = 5 * 3 =   15
•  10 % 3 – 4 / 2 = 1 – 2 =   -1
•  5.0 * 2.0 / 4.0 * 2.0
•   = 10.0 /4.0 *2.0
•   = 2.5 * 2.0