uses crt;
var i,m,n,t:integer;
begin
clrscr;
readln(n,m);
t:=0;
for i:=n to m do t:=t+i;
writeln(t);
readln;
end.
Var i,m,n:integer;
s:longint;
Begin
Write('Nhap m = ');readln(m);
Write('Nhap n = ');readln(n);
While m<n do
Begin
write('Nhap m = ');readln(m);
write('Nhap n = ');readln(n);
end;
For i:=n to m do
S:=s + i;
Write('Tong cac so tu n toi m la ',s);
Readln;
End.