Computer Science, asked by amarjeetparida1, 8 months ago

2. If y is of integer type, then the expression 3* (y - 8)/9
and (y-8)/9*3
(a) may or may not yield the same value
(b) must yield the same values​

Answers

Answered by BrainlyProgrammer
0

Answer:

I think option (a) .....

Answered by anindyaadhikari13
1

Answer:-

Given that, y is of integer data type.

3*(y-8)/9 and (y-8)/9*3 must yield the same value.

Consider, y=17

So,

  \sf 3 \times (y - 8) \div 9

 \sf = 3 \times 9 \div 9

 \sf = 3 \times 1

 \sf = 3

Also,

 \sf (y - 8) \div 9 \times 3

 \sf = (17 - 8) \div 9 \times 3

 \sf = 9 \div 9 \times 3

 \sf = 1 \times 3

 \sf = 3

Hence, both must yield same value.

Similar questions