procedure TForm1.BitBtn1Click(Sender: TObject);
Var
i,a,b,n:integer;
begin
a:= EditFormato1.AsInteger;
b:= EditFormato2.AsInteger;
n:=0;
for i := a to b do
begin
n:=n+i;
EditFormato3.AsFloat := n;
end;
Con el while
procedure TForm1.BitBtn1Click(Sender: TObject);
Var
a,b,n:integer;
begin
a:= EditFormato1.AsInteger;
b:= EditFormato2.AsInteger;
n:=0;
while a <= b do
begin
n:=n+a;
EditFormato3.AsFloat := n;
a:= a+1;
end;