E AGORA PESSOAL ?????????

Delphi

10/03/2003

function SOMA(s,x:real):real;
begin
s:=s+x;
// E AGORA PESSOAL COMO EU FAÇO PRA
// RETORNAR O VALOR ????
end;

procedure TForm1.Button3Click(Sender: TObject);
var
i, n: Integer;
s, x,resul: real;
begin
s:=0;
n:= ListBox1.Items.Count;
for i:=0 to n-1 do
begin
x:=StrToFloat(ListBox1.Items[i]); // x é o item na
resul:=SOMA(s,x);

end;


Harry

Harry

Curtidas 0

Respostas

Eniorm

Eniorm

10/03/2003

Essa é fácil cara...

function Soma(a, b : real): real;
begin
       Result := a + b;
end;


... e um abraço!


GOSTEI 0
POSTAR