Código Delphi [-] procedure TForm1.Button1Click(Sender: TObject); var nCont:integer; nSuma:Integer; begin nSuma:=0; For nCont:=0 to Listbox1.Items.Count - 1 do begin nSuma:=nSuma + StrToInt(Listbox1.Items[nCont]); end; ShowMessage(IntToStr(nSuma)); end;
procedure TForm1.Button1Click(Sender: TObject); var nCont:integer; nSuma:Integer; begin nSuma:=0; For nCont:=0 to Listbox1.Items.Count - 1 do begin nSuma:=nSuma + StrToInt(Listbox1.Items[nCont]); end; ShowMessage(IntToStr(nSuma)); end;