unit PunyaBayu;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Edit5: TEdit;
Edit6: TEdit;
Label5: TLabel;
Label6: TLabel;
Button4: TButton;
Label7: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
jm, hg, tb, by, km : real;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
jm := strtofloat(Edit2.Text);
hg := strtofloat(Edit3.Text);
tb := (jm*hg);
Edit4.Text := floattostr(tb);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Edit3.Clear;
Edit4.Clear;
Edit5.Clear;
Edit6.Clear;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
close;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
by := strtofloat(Edit5.Text);
km := (by-tb);
Edit6.Text := floattostr (km);
end;
end.
Tidak ada komentar:
Posting Komentar