Ver Mensaje Individual
  #5  
Antiguo 03-07-2011
thebest07 thebest07 is offline
Registrado
NULL
 
Registrado: jul 2011
Posts: 3
Reputación: 0
thebest07 Va por buen camino
Muchas gracias

ola amigos, muchas gracias por poner de su parte para k pudiera hacer este programa, bueno aki esta el codigo:


Código:
 
procedure Tfrmecuacion.cmdcalcularClick(Sender: TObject);
  var
  a,b,c: Integer;
  x1,x2,r: Real;
  begin
   a := StrToInt(txta.Text);
   b := StrToInt(txtb.Text);
   c := StrToInt(txtc.Text);
   r := b*b-4*a*c;
   x1:= (-b+ Sqrt(r))/2*a;
   x2:= (-b- Sqrt(r))/2*a;
  begin
   txtres1.Text := floattostr(x1);
   txtres2.text := floattostr(x2);

     end;
  end;


Ahora lo k kiero es hacer k a no sea igual a cero(0) y si es asi me tire un mensaje....diciendome que el primer valor no puede ser igual a Cero..

gracias...
Responder Con Cita