Fórum E AGORA PESSOAL ????????? #144082
10/03/2003
0
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;
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
Curtir tópico
+ 0
Responder
Posts
10/03/2003
Eniorm
Essa é fácil cara...
... e um abraço!
function Soma(a, b : real): real; begin Result := a + b; end;
... e um abraço!
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)