Cherry Blossom

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Sky full of stars

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Cat ^_^

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Sabtu, 13 April 2013

program menghitung bangun datar

hai blogger..
sekarang mau di post cara bikin program bangun ruang menggunakan borland delphi 7.
disini aku membuat program mengitung bangun ruang persegi panjang, lingkaran, persegi dan kubus.
dan memakai 27 label, 5 button click, 5 edit text, dan 4 image.
langsung saja ya.

- disini aku pakai variabel dengan tipe data real agar bisa membaca bilangan pecahan.


var
  Form1: TForm1;
p,l,r,luas,kll,s:real;
implementation


- selanjutnya, isi codingnya dengan:


procedure TForm1.Button1Click(Sender: TObject);
begin
p := strtofloat(edit1.Text);
l := strtofloat(edit2.Text);
luas := p*l;
kll := 2*(p+l);
label6.Caption := floattostr(luas);
label7.Caption := floattostr(kll);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
r := strtofloat(edit3.Text);
luas := 3.14*r*r;
kll := 2*3.14*r;
label13.Caption := floattostr(luas);
label14.Caption := floattostr(kll);
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
s := strtofloat(edit4.Text);
luas := s*s;
kll := 4*s;
label19.Caption := floattostr(luas);
label20.Caption := floattostr(kll);
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
s := strtofloat (edit5.Text);
luas := 6*s*s;
kll := 12*s;
label25.Caption := floattostr(luas);
label26.Caption := floattostr(kll);
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
close;
end;

end.



dan ini outputnya :







selamat mencoba :)