x=289
a = x div 100 = 289 div 100 = 2
b = x mod 100 div 10 = 289 mod 100 div 10 = 89 div 10 = 8
c = x mod 10 = 289 mod 10 = 9
s = a+b+c = 2+8+9 = 19
x=289
a = x div 100 = 289 div 100 = 2
b = x mod 100 div 10 = 289 mod 100 div 10 = 89 div 10 = 8
c = x mod 10 = 289 mod 10 = 9
s = a+b+c = 2+8+9 = 19