program tong_chiahet3;
uses crt;
var m,n,i,s:integer;
begin
clrscr;
write('Nhap M: '); readln(m);
write('Nhap N: '); readln(n);
s:=0;
for i:=m to n do
if i mod 3=0 then s:=s+i;
write('Tong cac so chia het cho 3 tu ',m,' den ',n,' la: ',s);
readln;
end.