Ver Mensaje Individual
  #3  
Antiguo 30-12-2020
Avatar de kuan-yiu
[kuan-yiu] kuan-yiu is offline
Miembro Premium
 
Registrado: jun 2006
Ubicación: Galicia. España.
Posts: 1.017
Reputación: 22
kuan-yiu Va camino a la fama
Código Delphi [-]
case CB1 of
1: //Cachorro de 2  meses
   Gra:=StrToFloatDef(Edit1.Text,0) * 10 /100;

2: //Cachorro de 3 a 4 meses
   Gra:=StrToFloatDef(Edit1.Text,0) * 8 /100;

// y todas las demás opciones
else
   Gra:=1; // Para cubrir todos los casos
end;

Label5.Text:=FloattoStr(Gra);
Hc:=(Gra * 60 )/100;
Cm:=(Gra * 20) /100;
Ov:=(Gra * 10) /100;
Fv:=(Gra * 5) /100;
Sn:=(Gra * 5) /100;
Label9.Text:=FloattoStr(Hc)  ;
Label10.Text:=FloattoStr(Cm)  ;
Label11.Text:=FloattoStr(Ov)  ;
Label12.Text:=FloattoStr(Fv)  ;
Label13.Text:=FloattoStr(Sn)  ;
Responder Con Cita