Исправь код unit Unit1;

{$mode objfpc}{$H+}

interface

uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;

type

{ TForm1 }

TForm1 = class(TForm)
Button1: TButton;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
CheckBox4: TCheckBox;
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
procedure CheckBox4Change(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure Label1Click(Sender: TObject);
private

public

end;

var
Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.Label1Click(Sender: TObject);
begin

end;

procedure TForm1.Edit1Change(Sender: TObject);
begin

end;

procedure TForm1.CheckBox4Change(Sender: TObject);
begin

end;

procedure TForm1.Button1Click(Sender: TObject);
var a, b, c:real;
begin
a:= StrToFloat(Edit1.Text);
b:= StrToFloat(Edit2.Text);
if CheckBox1.Checked=True then
begin
c:=a+b;
Label3.Caption:= 'Сума = ' +FloatToStr(c) ;
end;
if CheckBox2.Checked=True then
begin
c:=a+b;
Label3.Caption:= 'Різниця = ' +FloatToStr(c) ;
end;
if CheckBox3.Checked=True then
begin
c:=a+b;
end;
Label3.Caption:= 'Добуток = ' +FloatToStr(c) ;
end;
if CheckBox4.Checked=True then
begin
c:=a+b;
Label3.Caption:= 'Частка = ' +FloatToStr(c) ;
end.

Kirill20061337 Kirill20061337    1   15.04.2021 14:04    4

Другие вопросы по теме Информатика