Subject:
Computer ScienceAuthor:
harrellCreated:
1 year agoAnswer: m=16.5
n=42.5
p=106.25
Explanation: As increment and decrement operators are having higher precedence than multiplication and addition, multiplication and division are having higher precedence than addition.
So first we will solve the m part where we will use the value of m as 4.5 and then increment and same goes for n we will first use n's value as 2.5 then we will decrement it to 1.5, then we will go on following the precedence in the statement.
Then comes n where we will use the new value of m as 16.5 and first we will decrease the value of n by 1 as decrement operator is beforehand and then we will be calculating the answer, the same way as we did for m.
Then comes p here we have got the value of m and n and as the first conditions states that (m-n>5), which is wrong as (16.5-42.5>5) so as this condition is wrong the value of n*2.5 will be assigned to p.
Author:
casemaoc
Rate an answer:
3