FB

Delphi Menghitung Luas dan Keliling Segitiga

Wednesday, March 10, 2010

var
Form1: TForm1;
a,b,kel,luas:Single;
implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
a:=StrToFloat(txtAlas.Text);
b:=StrToFloat(txtTinggi.Text);

kel:=a+a+b;
luas:=a*b/2;

txtKel.Text:=(FloatToStr(kel));
txtLuas.Text:=(FloatToStr(luas));

end;

end.

0 comments: