unit room;

interface

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

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    LabeledEdit1: TLabeledEdit;
    LabeledEdit2: TLabeledEdit;
    LabeledEdit3: TLabeledEdit;
    LabeledEdit4: TLabeledEdit;
    Button1: TButton;
    Button2: TButton;
    Shape1: TShape;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
a, b, h, s: real;
begin
 a:=StrToFloat(LabeledEdit1.Text);
 b:=StrToFloat(LabeledEdit2.Text);
 h:=StrToFloat(LabeledEdit3.Text);
 s:=2*(a+b)*h;
 LabeledEdit4.Text:=FloatToStr(s);
end;

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

end.
