Computer Science, asked by ladymedeasolon, 4 months ago

q = ++p - --p*5 + 40/++p;
evaluate no spam pls

Answers

Answered by riz36
4

Answer:

(after the program)

q= -36

p=11

Explanation:

q= 11 - 10*5 + 40/11

now solve it through BODMAS rule

<1st> +40/11

<2nd> -10*5

<3rd> adding the 1st and 2nd

then subtracting 11- 3rd.

and there you have the answer

p.s. the values of p and q here before the program was executed is 10 and 20. you may follow the same with any other number.

Similar questions