What are the values of the following expressions, assuming that n and m have type int, n

Question:

What are the values of the following expressions, assuming that n and m have type int,


n is 17, and m is 18?
a. n / 10 + n % 10
b. n % 2 + m % 2
c. (m + n) / 2
d. (m + n) / 2.0
e. (int) (0.5 * (m + n))
f. (int) Math.round(0.5 * (m + n))

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: