unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Math;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Memo1: TMemo;
    CheckBox1: TCheckBox;
    RadioGroup1: TRadioGroup;
    Button1: TButton;
    Button2: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
Edit1.Text:='Введите значение..' ;
Edit2.Text:='Введите значение..'  ;
Memo1.Clear;
Memo1.Lines.Add('Лаб. раб. №2 020602 Сенкевич А.В.') ;
RadioGroup1.ItemIndex:=0;
end;

procedure TForm1.Button1Click(Sender: TObject);
var x,m,j,f: extended;
begin
x:=StrToFloat(Edit1.Text);
m:=StrToFloat(Edit2.Text);
Memo1.Lines.Add('x='+FloatToStrF(x,fffixed,8,4));
Memo1.Lines.Add('m='+FloatToStrF(m,fffixed,8,4));
case RadioGroup1.ItemIndex of
 0: f:=Sinh(x);
 1: f:=sqr(x);
 2: f:=exp(x);
 end;
if (m<x) and (m>-1) then j:=sin(5*f+m*abs(f))
else if x>m then j:=cos(3*f+m*abs(f))
else  j:=sqr(f+m);
if CheckBox1.Checked then
 Memo1.Lines.Add('j='+IntToStr(Round(j)))
else
 Memo1.Lines.Add('j='+FloatToStrF(j,fffixed,8,4));

end;

procedure TForm1.Button2Click(Sender: TObject);
begin
print;
end;

end.
