STD VIII - Arithmetic Operators
STD VIII - Arithmetic Operators
Arithmetic operators
x + y = 19
x - y = 11
x * y = 60
x / y = 3.75
x // y = 3
x ** y = 50625
Order of Precedence
Precedence is used to determine the order of evaluation of an expression involving more
than one operator.
The order is:
I) ( ) - Parenthesis (Rounded brackets)
I) *, /, %, // ( Left to right -whichever comes first)
II) +, - (Left to right after calculation of *,/,%)
12 + 12 – 3.0 15 * 4 - 6 / 2 12+ 3 * ( -2 ) / 2
24 -3.0 60 - 6 / 2 12 - 6 / 2
21.0 Answer 60 - 3.0 12- 3.0
57.0 Answer 9.0 Answer
Exercise :
Q. 1 Evaluate the following expression:
a) 37/(5*2)
b) 37/5/2
c) 37* (5/2)
d) 37%(5%2)
e) 37%5%2
f) 37-5 *2