13. Which expression evaluates to 14 if integer y = 13?
Answer: C
11 + y % 5 evaluates to 14 when y = 13
When integer y equals 13, the expression 11 + y % 5 simplifies to 11 + 13 % 5, which equals 11 + 3, resulting in 14.
A) 11.0 - y / 5
This expression evaluates to 11.0 - 13 / 5, which simplifies to 11.0 - 2.6, resulting in 8.4. Therefore, it does not equal 14.
B) (11 + y) % 5
Here, we calculate (11 + 13) % 5, which simplifies to 24 % 5, equaling 4. This option does not result in 14.
C) 11 + y % 5
For this expression, we see that 11 + 13 % 5 simplifies to 11 + 3, which equals 14. Thus, this option is correct.
D) 11 - y / 5.0
This expression evaluates as 11 - 13 / 5.0, which simplifies to 11 - 2.6, resulting in 8.4. Hence, it also does not equal 14.
Conclusion
The expression 11 + y % 5 is the only option that evaluates to 14 when y is 13, confirming its correctness. All other options yield results that are significantly lower than 14, validating their incorrectness.