n - numarul dat
c - cat
r - rest
r = 2c
n : 6 = c si r
n: 6 = c si 2c , 6>c -> n = 6c + 2c = 8c
Pt c=0: n=0
Pt c=1 : n = 8*1 = 8 , r =2
Pt c=2 : n = 8*2 = 16 , r = 4
Pt c=3 : n= 8*3 = 24 , r = 6 , dar r>6 , nu convine
Pt c=4 : n= 8*4 = 32 , r = 8 , dar r>6 . nu convine
Pt c =5 : n = 8*5 = 40 , r = 10 , dar r>6 , nu convine