Documente Academic
Documente Profesional
Documente Cultură
interface
uses
type
TForm1 = class(TForm)
Button1: TButton;
PageControl1: TPageControl;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
Button2: TButton;
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Button3: TButton;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Edit2: TEdit;
Button4: TButton;
Image1: TImage;
Memo1: TMemo;
Timer1: TTimer;
MediaPlayer1: TMediaPlayer;
Button5: TButton;
Button6: TButton;
Button7: TButton;
PageControl2: TPageControl;
TabSheet3: TTabSheet;
TabSheet4: TTabSheet;
Image2: TImage;
Timer2: TTimer;
MediaPlayer2: TMediaPlayer;
Memo2: TMemo;
PageControl3: TPageControl;
TabSheet5: TTabSheet;
TabSheet6: TTabSheet;
Timer3: TTimer;
PageControl4: TPageControl;
TabSheet7: TTabSheet;
TabSheet8: TTabSheet;
Memo4: TMemo;
Image4: TImage;
Timer4: TTimer;
MediaPlayer4: TMediaPlayer;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
Label18: TLabel;
Button9: TButton;
Label19: TLabel;
Edit4: TEdit;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Button10: TButton;
Label25: TLabel;
Label26: TLabel;
Memo3: TMemo;
MediaPlayer3: TMediaPlayer;
Image3: TImage;
Button8: TButton;
Edit3: TEdit;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Label30: TLabel;
Edit5: TEdit;
Button13: TButton;
Label31: TLabel;
Label32: TLabel;
Label33: TLabel;
Label34: TLabel;
Edit6: TEdit;
Button12: TButton;
Label35: TLabel;
Label36: TLabel;
Label37: TLabel;
Label38: TLabel;
Edit7: TEdit;
Button14: TButton;
Label39: TLabel;
Label40: TLabel;
Label41: TLabel;
Label42: TLabel;
Edit8: TEdit;
Button15: TButton;
Button16: TButton;
Label43: TLabel;
Label44: TLabel;
Label45: TLabel;
Label46: TLabel;
Button11: TButton;
Label47: TLabel;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
a:integer;
p,l : integer;
alas,t:integer;
Als, tinggi:integer;
b,c,d:integer;
sisimiring:integer;
pi:real;
r :real;
luas : real;
keliling:real;
jwbluas:string;
jwbkeliling:string;
implementation
{$R *.dfm}
begin
p:=Random(100)+5;
l:=Random(50)+5;
label2.Caption:=inttostr(p);
label4.Caption:=inttostr(l);
luas:=p*l;
jwbluas:=floattostr(luas);
label8.Caption:=inttostr(p);
label10.Caption:=inttostr(l);
keliling:=2*p+2*l;
jwbkeliling:=floattostr(keliling);
end;
begin
if edit1.Text=jwbluas then
end;
begin
if edit2.Text=jwbkeliling then
else
end;
begin
image1.Left:=image1.Left-a;
image1.Picture.LoadFromFile('persegipanjang.jpg');
memo1.Lines.LoadFromFile('persegipanjang.txt');
begin
a:=-a;
end;
end;
begin
a:=1 ;
end;
begin
image2.Left:=image1.Left-a;
image2.Picture.LoadFromFile('segitiga.jpg');
memo2.Lines.LoadFromFile('segitiga.txt');
begin
a:=-a;
end;
end;
begin
image3.Left:=image1.Left-a;
image3.Picture.LoadFromFile('lingkaran.jpg');
memo3.Lines.LoadFromFile('lingkaran.txt');
begin
a:=-a;
end;
end;
procedure TForm1.Button7Click(Sender: TObject);
begin
image4.Left:=image1.Left-a;
image4.Picture.LoadFromFile('jajargenjang.jpg');
memo4.Lines.LoadFromFile('jajargenjang.txt');
begin
a:=-a;
end;
end;
begin
alas:=Random(100)+10;
t:=Random(50)+10;
b:=Random(50)+10;
c:=Random(50)+10;
d:=Random(50)+10;
label14.Caption:=inttostr(alas);
label16.Caption:=inttostr(t);
luas:=1/2*(alas*t);
jwbluas:=floattostr(luas);
label20.Caption:=inttostr(b);
label22.Caption:=inttostr(c);
label24.Caption:=inttostr(d);
keliling:= (b+c+d);
jwbkeliling:=floattostr(keliling);
end;
begin
if edit3.Text=jwbluas then
else
end;
begin
if edit4.Text=jwbkeliling then
else
end;
begin
Als:=Random(10)+5;
tinggi:=Random(10)+5;
sisimiring:=Random(10)+5;
label36.Caption:=inttostr(Als);
label43.Caption:=inttostr(tinggi);
label46.Caption:=inttostr(sisimiring);
label40.Caption:=inttostr(Als);
luas:=Als*tinggi;
jwbluas:=floattostr(luas);
jwbkeliling:=floattostr(keliling);
end;
begin
if edit7.Text=jwbluas then
else
end;
begin
if edit8.Text=jwbkeliling then
else
end;
var pi,r:real;
begin
pi:=3.14 ;
r:=Random(10)+5;
label28.Caption:=floattostr(r);
label32.Caption:=floattostr(r);
luas:=3.14*r*r;
jwbluas:=floattostr(luas);
keliling:= 2*3.14*r;
jwbkeliling:=floattostr(keliling);
end;
begin
if edit5.Text=jwbluas then
else
end;
begin
if edit6.Text=jwbkeliling then
else
end;
end.