unit Unit1;

interface

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

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

var
  Form1: TForm1;

implementation

{$R *.dfm}



procedure TForm1.FormCreate(Sender: TObject);
  begin
  Edit1.text:='1';
  Edit2.text:='0,2';
  Edit3.text:='2';
  Memo1.Clear;
  Memo1.Lines.Add('Лаб. работа гр.020601 Куликовская М.А.');
end;


procedure TForm1.Button1Click(Sender: TObject);

var x,y,z,u,ma,mi,r :extended;
begin

     x:=StrToFloat(Edit1.Text);
        Memo1.Lines.Add(' x='+Edit1.Text);
     y:=StrToFloat(Edit2.Text);
        Memo1.Lines.Add(' y='+Edit2.Text);
     z:=StrToFloat(Edit3.Text);
        Memo1.Lines.Add(' z='+Edit3.Text);

     case RadioGroup1.ItemIndex of
        0: u:=sinh(x);
        1: u:=sqr(x);
        2: u:=exp(x);
         end;
  if  CheckBox1.Checked then
                   begin u:=abs(u);
                         y:=abs(y);
                         z:=abs(z)
                         end;
   if (u<y) then mi:=u else mi:=y;
   if (mi>z) then ma:=mi else ma:=z;
   r:=ma;

if  CheckBox1.Checked then
Memo1.Lines.Add(' maxabs='+FloatToStrF(ma,ffFixed,8,2))
                            else
Memo1.Lines.Add(' max='+FloatToStrF(ma,ffGeneral,8,2));
end;

end.
