Помогите решить задание Lazarus ax+b=0
Вот я что-то пыталась, но только начинаю работать з Lazarus
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Edit3: TEdit;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
var a,b,x: string;
begin
a:= Edit1.Text;
b:= Edit3.Text;
begin
if a:=0 then
Label1.Caption:='nemae';
else
if a:=0 and b:=0 then
Label1.Caption:='bezlich';
else
if Not(a=0) and b:=0 then
Label1.Caption:=FloatToStr(x=0):
if Not(a=0) and Not (b=0) then
x:=b/a;
Label1.Caption:=FloatToStr(x);
end;