∣a−b∣+∣b−c∣=∣c−a∣. This equation is only valid when
b lies between
a and
c. Thus, there are two cases possible -
ab. Thus, if we assume the value of
c=99 and
b=98 (which are the two maximum possible values), then -
​∣a−98∣+∣98−99∣=∣99−a∣, and we assumed that a<b, thus a<98. ⇒98−a+1=99−a=>0=0​Thus, any value of
a<98 is possible for this equation.
Therefore,
c=99, b=98 and
a<98Case -2:-
cb. Thus, if we assume the value of
a=99 and
b=98 (which are the two maximum possible values), then -
​∣99−98∣+∣98−c∣=∣c−99∣, and we assumed that c<b, thus c<98. ⇒1+98−c=99−c=>0=0​Thus, any value of
c<98 is possible for this equation.
Therefore,
a=99, b=98 and
c<98Thus, in both cases, the maximum value of
b=98.