Documente Academic
Documente Profesional
Documente Cultură
interface
uses
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Label4: TLabel;
Label5: TLabel;
Edit4: TEdit;
Edit5: TEdit;
Button1: TButton;
Label6: TLabel;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
s,p,l,t,a,ta:integer;
lp,vol:real;
implementation
{$R *.dfm}
begin
label1.caption:='SISI ALAS';
label2.caption:='TINGGI ALAS';
label3.caption:='TINGGI';
end;
begin
label1.Caption:='SISI';
label2.caption:='SISI';
label3.caption:='SISI';
end;
begin
label1.caption:='PANJANG';
label2.caption:='LEBAR';
label3.caption:='TINGGI';
end;
begin
label1.caption:='TINGGI';
label2.caption:='TINGGI ALAS';
label3.caption:='SISI ALAS';
end;
begin
if radiobutton1.checked=true then
s:=strtoint(edit1.Text);
s:=strtoint(edit2.Text);
s:=strtoint(edit3.Text);
lp:=6*s*s;
vol:=s*s*s;
edit4.Text:=floattostr(lp);
edit5.text:=floattostr(vol);
if radiobutton2.Checked=true then
p:=strtoint(edit1.Text);
l:=strtoint(edit2.Text);
t:=strtoint(edit3.Text);
lp:=(2*p*t)+(2*p*l)+(2*l*t);
vol:=p*l*t;
edit4.Text:=floattostr(lp);
edit5.Text:=floattostr(vol);
if radiobutton3.Checked=true then
a:=strtoint(edit1.Text);
ta:=strtoint(edit2.Text);
t:=strtoint(edit3.Text);
lp:=(a*ta)+(a*t);
vol:=(1/2)*a*ta*t;
edit4.Text:=floattostr(lp);
edit5.Text:=floattostr(vol);
if radiobutton4.Checked=true then
t:=strtoint(edit1.Text);
ta:=strtoint(edit2.Text);
a:=strtoint(edit3.Text);
lp:=(1/2)*a*ta+(3*(1/2)*a*sqrt(sqr((1/3)*ta)+sqr(t)));
vol:=(1/3)*(1/2)*a*ta*t;
edit4.Text:=floattostr(lp);
edit5.Text:=floattostr(vol);
end;
end;
begin
label1.Caption:='';
label2.caption:='';
label3.caption:='';
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
edit4.Text:='';
edit5.Text:='';
end;
end.