unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
GroupBox1: TGroupBox;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
Button7: TButton;
Label5: TLabel;
Label1: TLabel;
Button8: TButton;
Button9: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button7Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure GroupBox1Click(Sender: TObject);
procedure Label4Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
a,b:integer;
d:integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
a:=strtoint(edit1.Text);
b:=strtoint(edit2.Text);
d:=a+b ;
label5.caption:=inttostr(d);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
a:=strtoint(edit1.Text);
b:=strtoint(edit2.Text);
d:=a-b ;
label5.caption:=inttostr(d);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
a:=strtoint(edit1.Text);
b:=strtoint(edit2.Text);
d:=a*b ;
label5.caption:=inttostr(d);
end;
procedure TForm1.Button4Click(Sender: TObject);
var a,b: integer;
var d:real;
begin
a:=strtoint(edit1.Text );
b:=strtoint(edit2.Text );
d:= (a / b) ;
label5.Caption := floattostr(d);
end;
procedure TForm1.Button5Click(Sender: TObject);
var a,b,c ,i:integer;
begin
a:=strtoint(edit1.Text);
b:= strtoint(edit2.text);
d:=a;
for i:=1 to (b-1) do
begin
d:=d*a;
end;
label5.caption:=inttostr(d);
end;
procedure TForm1.Button7Click(Sender: TObject);
var a,b: integer;
var d:double;
begin
a:=strtoint(edit1.Text );
b:=strtoint(edit2.Text );
d:= (a mod b) ;
label5.Caption := floattostr(d);
end;
procedure TForm1.Button6Click(Sender: TObject);
var a,b,c: integer;
begin
a:=strtoint(edit1.Text );
b:=strtoint(edit2.Text );
d:= a Div b ;
label5.Caption := inttostr(d);
end;
procedure TForm1.GroupBox1Click(Sender: TObject);
begin
showmessage('Apakah Anda sudah Memahaminya');
application.Terminate ;
end;
procedure TForm1.Label4Click(Sender: TObject);
begin
showmessage('SUDAHKAN ANDA MENYIMPAN');
application.Terminate ;
end;
procedure TForm1.Button9Click(Sender: TObject);
begin
edit1.Clear ;
edit2.Clear ;
label5.Caption :='';
edit1.SetFocus ;
end;
procedure TForm1.Button8Click(Sender: TObject);
begin
showmessage('jangan lupa disimpan');
application.Terminate ;
end;
end.
"jangan lupa coba praktekkan Ya....."
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
GroupBox1: TGroupBox;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
Button7: TButton;
Label5: TLabel;
Label1: TLabel;
Button8: TButton;
Button9: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button7Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure GroupBox1Click(Sender: TObject);
procedure Label4Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
a,b:integer;
d:integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
a:=strtoint(edit1.Text);
b:=strtoint(edit2.Text);
d:=a+b ;
label5.caption:=inttostr(d);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
a:=strtoint(edit1.Text);
b:=strtoint(edit2.Text);
d:=a-b ;
label5.caption:=inttostr(d);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
a:=strtoint(edit1.Text);
b:=strtoint(edit2.Text);
d:=a*b ;
label5.caption:=inttostr(d);
end;
procedure TForm1.Button4Click(Sender: TObject);
var a,b: integer;
var d:real;
begin
a:=strtoint(edit1.Text );
b:=strtoint(edit2.Text );
d:= (a / b) ;
label5.Caption := floattostr(d);
end;
procedure TForm1.Button5Click(Sender: TObject);
var a,b,c ,i:integer;
begin
a:=strtoint(edit1.Text);
b:= strtoint(edit2.text);
d:=a;
for i:=1 to (b-1) do
begin
d:=d*a;
end;
label5.caption:=inttostr(d);
end;
procedure TForm1.Button7Click(Sender: TObject);
var a,b: integer;
var d:double;
begin
a:=strtoint(edit1.Text );
b:=strtoint(edit2.Text );
d:= (a mod b) ;
label5.Caption := floattostr(d);
end;
procedure TForm1.Button6Click(Sender: TObject);
var a,b,c: integer;
begin
a:=strtoint(edit1.Text );
b:=strtoint(edit2.Text );
d:= a Div b ;
label5.Caption := inttostr(d);
end;
procedure TForm1.GroupBox1Click(Sender: TObject);
begin
showmessage('Apakah Anda sudah Memahaminya');
application.Terminate ;
end;
procedure TForm1.Label4Click(Sender: TObject);
begin
showmessage('SUDAHKAN ANDA MENYIMPAN');
application.Terminate ;
end;
procedure TForm1.Button9Click(Sender: TObject);
begin
edit1.Clear ;
edit2.Clear ;
label5.Caption :='';
edit1.SetFocus ;
end;
procedure TForm1.Button8Click(Sender: TObject);
begin
showmessage('jangan lupa disimpan');
application.Terminate ;
end;
end.
"jangan lupa coba praktekkan Ya....."