После поставување на три edit  (Edit1, Edit2 и Edit3) две label  (Label1 и Label2 ) и еден button (Button1 ) на двоен клик на Button1 се отвора процедура за Button1 и се впишува следниот код:

procedure TForm1.Button1Click(Sender: TObject);   var a,b,c,d,x1,x2:real;
begin
a:=strtofloat(edit1.Text);
b:=strtofloat(edit2.Text);
c:=strtofloat(edit3.Text);
d:=sqr(a)-4*a*c;
if d>0 then 
    begin
        x1:=(-b+sqrt(d))/2*a;
        x2:=(-b-sqrt(d))/2*a ;
        label1.Caption:=floattostr(x1);
        label2.Caption:=floattostr(x2);
        showmessage('Ravenkata ima dve resenija');
    end;
if d=0 then
    begin
        x1:=(-b+sqrt(d))/2*a;
        x2:=(-b-sqrt(d))/2*a ;
        label1.Caption:=floattostr(x1);
        label2.Caption:=floattostr(x2);
        showmessage('Ravenkata ima samo edno resenie');
    end;
if d<0 then
    label1.Caption:='Nema realni resenija';
end;