Kalkulator Sederhana yang pernah Saya Buat
Ni Listingnya:
var
Form1: TForm1;
a,b,z:double;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
a:=StrToFloat(txtVal1.Text);
b:=StrToFloat(txtVal2.Text);
z:=a+b;
ShowMessage(FloatToStr(z));
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
a:=StrToFloat(txtVal1.Text);
b:=StrToFloat(txtVal2.Text);
z:=a-b;
ShowMessage(FloatToStr(z));
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
a:=StrToFloat(txtVal1.Text);
b:=StrToFloat(txtVal2.Text);
z:=a*b;
ShowMessage(FloatToStr(z));
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
a:=StrToFloat(txtVal1.Text);
b:=StrToFloat(txtVal2.Text);
z:=a/b;
ShowMessage(FloatToStr(z));
end;
end.
FB
Delphi Membuat Kalkulator Sederhana
Wednesday, March 10, 2010
Labels:
Delphi,
Pemrograman
Posted by
Rangga Pratama
at
9:36 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment