All pastes #409980 Raw Edit

Something

public text v1 · immutable
#409980 ·published 2007-03-26 00:56 UTC
rendered paste body
function Tform1.juroscomposto(ValorCalc, Perc, Parc: String): Real;
var A, B, Valor, Taxa: real;
    I: Integer;
begin
 Valor := StrToFloat(ValorCalc);
 Taxa := StrToFloat(Perc);

 for I :=1 to StrToInt(Parc) do
 begin
  if A = 0 then
  begin
   A := power(valor*(1+(Taxa/100)),1);
   result := A;
  end
  else if B = 0 then
  begin
   B := power(A*(1+(Taxa/100)),1);
   Result := B;
  end
  else
  begin
   B := power(B*(1+(Taxa/100)),1);
   result := B;
  end;
 end;
end;