Selasa, 26 Oktober 2010
unit penjualan; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Button1: TButton; Button2: TButton; editharga: TEdit; editjumlah: TEdit; editbayarbarang: TEdit; Label6: TLabel; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var hargabarang,jumlahbarang,jumlahbayar:integer; begin hargabarang := StrtoInt(editharga.Text); jumlahbarang := StrtoInt(editjumlah.Text); jumlahbayar := hargabarang * jumlahbarang; editbayarbarang.text:=InttoStr (jumlahbayar); end; procedure TForm1.Button2Click(Sender: TObject); begin close; end; end.
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar