Computer Applications

If m=5, n=2; what will be the output of m and n after execution?

i. m -= n       ii. n = m + m/n

Java Operators

ICSE 2005

151 Likes

Answer

i.  m -= n
⇒ m = m - n
⇒ m = 5 - 2
⇒ m = 3

ii. n = m + m/n
⇒ n = 5 + 5/2
⇒ n = 5 + 2
⇒ n = 7

Answered By

103 Likes


Related Questions