Ver Mensaje Individual
  #10  
Antiguo 29-11-2011
Avatar de olbeup
olbeup olbeup is offline
Miembro
 
Registrado: jul 2005
Ubicación: Santiago de la Ribera (España)
Posts: 688
Reputación: 21
olbeup Va camino a la fama
Espero que esto se lo que estas buscando
Código Delphi [-]
...
var
  EQ: Extended;     // Valor Equivalente 1..9
  E1, E2: Integer;  // Edit, 1..2
  E3: Extended;     // Edit3
begin
  E1 := StrToInt(Edit1.Text);
  E2 := StrToInt(Edit2.Text);
  case E2 of
    1: EQ := 1.0625;
    2: EQ := 1.375;
    3: EQ := 1.875;
    4: EQ := 2.625;
    5: EQ := 3.625;
    6: EQ := 4.875;
    7: EQ := 6.375;
    8: EQ := 8.125;
    9: EQ := 10.125;
  end;

  E3 := (E1 * EQ);

  Edit3.Text := FormatFloat('0.0000', E3);
end;
Un saludo.
Responder Con Cita