Ver Mensaje Individual
  #8  
Antiguo 16-12-2009
sergiovalp sergiovalp is offline
Registrado
 
Registrado: may 2007
Posts: 9
Reputación: 0
sergiovalp Va por buen camino
Te faltaron los begin / end y el tipo de dato real.

Código Delphi [-]
 
procedure TForm1.Button1Click(Sender: TObject);
var
vprestamo:integer;
ano1:real;
const
int1=0.22;
int2=0.18;
begin
  vprestamo:=strtoint(edit1.Text);
  if vprestamo <= 50000 then
  begin
    ano1:=vprestamo * int1;
    edit2.Text:=format('%f8,2',[ano1]);
  end
  else
  begin
    ano1:=vprestamo * int2;
    edit2.Text:=format('%f8,2',[ano1]);
  end;
end;

atte
Sergio
Responder Con Cita