uses crt;
var i,m,n,t:integer;
begin
clrscr;
repeat
write('Nhap m='); readln(m);
write('Nhap n='); readln(n);
until (0<=m) and (0<=n) and (m<n);
t:=0;
for i:=m to n do
t:=t+i;
writeln('Tong cac so tu nhien trong khoang tu ',m,' toi ',n,' la: ',t);
readln;
end.