unit Unit1;

interface

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

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

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var x,q,u,k:extended;
begin
Memo1.Clear;
Memo1.Lines.Add('Лаб. раб. №2 ст. гр. 020601 Ураева Д.А.');
x:=StrToFloat(Edit1.Text);
q:=StrToFloat(Edit2.Text);
Memo1.Lines.Add('x='+FloatToStrF(x,ffFixed,8,2));
Memo1.Lines.Add('q='+FloatToStrF(q,ffFixed,8,2));
     case RadioGroup1.ItemIndex of
        0: u:=sin(x);
        1: u:=sqr(x);
        2: u:=exp(x);
        end;
 if abs(x*q)>10 then k:=ln(abs(u)+abs(q))  else k:=u+q;
 if abs(x*q)<10 then k:=exp(u+q) else k:=u+q;
  if CheckBox1.Checked then
          Memo1.Lines.Add('Результат равен '+IntToStr(Round(k)))
                                      else
          Memo1.Lines.Add('Результат равен '+FloatToStrF(k,ffGeneral,8,2));

end;

procedure TForm1.FormCreate(Sender: TObject);
begin
 Edit1.text:='1';
  Edit2.text:='1';
  Memo1.Clear;
  Memo1.Lines.Add('Лаб. раб. №2 ст. гр. 020601 Ураева Д.А.');
  RadioGroup1.ItemIndex:=0;

end;

end.
