procedure TForm1.BplusClick(Sender: TObject);
var
Nilai1,Nilai2:real;
plus :real;
begin
label3.Caption:= Bplus.Caption;
Nilai1:=strtofloat(enilai1.text);
Nilai2:=strtofloat(enilai2.text);
plus:=Nilai1+Nilai2;
ehasil.text:=floattostr(plus);
end;
procedure TForm1.BminClick(Sender: TObject);
var
Nilai1,Nilai2:real;
min:real;
begin
label3.Caption:= Bmin.Caption;
Nilai1:=strtofloat(enilai1.text);
Nilai2:=strtofloat(enilai2.text);
min:=Nilai1-Nilai2;
ehasil.text:=floattostr(min);
end;
procedure TForm1.BperClick(Sender: TObject);
var
Nilai1,Nilai2:real;
per:real;
begin
label3.Caption:= Bper.Caption;
Nilai1:=strtofloat(enilai1.text);
Nilai2:=strtofloat(enilai2.text);
per:=Nilai1/Nilai2;
ehasil.text:=floattostr(per);
end;
procedure TForm1.BkaliClick(Sender: TObject);
var
Nilai1,Nilai2:real;
kali :real;
begin
label3.Caption:= Bkali.Caption;
Nilai1:=strtofloat(enilai1.text);
Nilai2:=strtofloat(enilai2.text);
kali:=Nilai1 * Nilai2;
ehasil.text:=floattostr(kali);
end;
procedure TForm1.BersihClick(Sender: TObject);
begin
enilai1.Clear;
enilai2.Clear;
ehasil.Clear;
end;
procedure TForm1.BcloseClick(Sender: TObject);
begin
close;
end;
end.
var
Nilai1,Nilai2:real;
plus :real;
begin
label3.Caption:= Bplus.Caption;
Nilai1:=strtofloat(enilai1.text);
Nilai2:=strtofloat(enilai2.text);
plus:=Nilai1+Nilai2;
ehasil.text:=floattostr(plus);
end;
procedure TForm1.BminClick(Sender: TObject);
var
Nilai1,Nilai2:real;
min:real;
begin
label3.Caption:= Bmin.Caption;
Nilai1:=strtofloat(enilai1.text);
Nilai2:=strtofloat(enilai2.text);
min:=Nilai1-Nilai2;
ehasil.text:=floattostr(min);
end;
procedure TForm1.BperClick(Sender: TObject);
var
Nilai1,Nilai2:real;
per:real;
begin
label3.Caption:= Bper.Caption;
Nilai1:=strtofloat(enilai1.text);
Nilai2:=strtofloat(enilai2.text);
per:=Nilai1/Nilai2;
ehasil.text:=floattostr(per);
end;
procedure TForm1.BkaliClick(Sender: TObject);
var
Nilai1,Nilai2:real;
kali :real;
begin
label3.Caption:= Bkali.Caption;
Nilai1:=strtofloat(enilai1.text);
Nilai2:=strtofloat(enilai2.text);
kali:=Nilai1 * Nilai2;
ehasil.text:=floattostr(kali);
end;
procedure TForm1.BersihClick(Sender: TObject);
begin
enilai1.Clear;
enilai2.Clear;
ehasil.Clear;
end;
procedure TForm1.BcloseClick(Sender: TObject);
begin
close;
end;
end.

Tidak ada komentar:
Posting Komentar