. Evaluate the following expression in c++ : 100/20 < = 10 – 5 + 100% 5 – 20
Answers
The evaluation of the given expression results in 0, which represents 'False'.
Explanation:
Given expression is: 100/20 <= 10 - 5 + 100% 5 - 20
The operators present in this expression is [/, <=, -, +, %]
By operating precedence, the priorities will be:
1. / and % (modulus gives remainder) will have the same priority. [left to right]
2. + and - will have the same priority. [left to right]
3. Atlast, <=. [left to right]
The evaluation will be done as follow:
100/20 <= 10 - 5 + 100% 5 - 20 ⇒ 5 <= 10 - 5 + 100% 5 - 20
⇒ 5 <= 10 - 5 + 0 - 20
⇒ 5 <= 5 + 0 - 20
⇒ 5 <= 5 - 20
⇒ 5 <= -15
As 5 <= -15 is False, the output will be 0.
Therefore, 100/20 <= 10 - 5 + 100% 5 - 20 = 0
Here, 0 is a boolean value that represents 'false'.
Learn more:
1. Ch+=2 is equivalent to
https://brainly.in/question/21331324
2. True or false: to join two strings, use the dollar ($) character.
brainly.in/question/21624446
Step-by-step explanation:
\begin{gathered}\boxed{\begin{array}{cccc}\bf x & \bf y \\ \frac{\qquad \qquad \qquad \qquad}{} & \frac{\qquad \qquad \qquad \qquad}{} \\ \sf 0 & \sf - 2.5 \\ \\ \sf 5 & \sf 0 \end{array}} \\ \end{gathered}