0
656views
Determine the hierarchy of operations and evaluate the following expression:- on = ink*act/2+3/2*act+2+tig; ( ink = 4, act = 1, tig = 3.2, assume on to be an int)
1 Answer
written 13 months ago by | • modified 13 months ago |
on = ink * act/2+3/2 * act+2+tig ;
(ink=4, act=1, tig=3.2)
So, the expression will be:
on = 4 * 1/2+3/2 * 1+2+3.2
on = 4/2+3/2 * 1+2+3.2
Operation : *
on = 2+3/2*1+2+3.2
Operation : /
on = 2+1*1+2+3.2
Operation : /
on = 2+1+2+3.2
Operation : *
on = 3+2+3.2
Operation : +
on = 5+3.2
Operation : +
on = 8
Operation : +
Therefore, the expression’s answer will be, on = 8