Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
15Activity
0 of .
Results for:
No results containing your search query
P. 1
sebagian RUMUS DELPHI

sebagian RUMUS DELPHI

Ratings: (0)|Views: 1,205 |Likes:
Published by Abdul Salim
kerja salim
kerja salim

More info:

Published by: Abdul Salim on Jun 03, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less

04/22/2013

pdf

text

original

 
var a, b, c, d, e, f, g, h, i, j : real;x : real;Sgm, StandarDeviasi : Real;Kc : Real;kb : Real;begina := StrToFloat(Edit1.Text);b := StrToFloat(Edit2.Text);c := StrToFloat(Edit3.Text);d := StrToFloat(Edit4.Text);e := StrToFloat(Edit5.Text);f := StrToFloat(Edit6.Text);g := StrToFloat(Edit7.Text);h := StrToFloat(Edit8.Text);i := StrToFloat(Edit9.Text); j := StrToFloat(Edit10.Text);//menghitung nilai rata-ratax := (a+b+c+d+e+f+g+h+i+j)/10;Label11.Caption := 'Nilai Rata-Ratanya Adalah';Edit11.Text := FloatToStr(x);//menghitung standar deviasiSgm := 0;Sgm := sgm+sqr(a-x)+sqr(b-x)+sqr(c-x)+sqr(d-x)+sqr(e-x)+sqr(f-x)+sqr(g-x)+sqr(h-x)+sqr(i-x)+sqr(j-x);StandarDeviasi := sqrt(sgm/9);Label12.Caption := 'StandarDeviasinya Adalah';Edit12.Text :=FloatToStr(StandarDeviasi);//menghitung nilai terkecilkc := a;if b < kc then kc := belse kc := kc;if c < kc then kc := celse kc := kc;if d < kc then kc := delse kc := kc;if e < kc then kc := eelse kc := kc;if f < kc then kc := f else kc := kc;if g < kc then kc := gelse kc := kc;if h < kc then kc := helse kc := kc;if i < kc then kc := ielse kc := kc;if j < kc then kc := jelsekc := kc;Label13.Caption := 'Nilai TerkecilAdalah';
 
Edit13.Text := FloatToStr(Kc);//menghitung nilai terbesarkb := a;if b > kb then kb := belse kb := kb;if c > kb then kb := celse kb := kb;if d > kb then kb := delse kb := kb;if e > kb then kb := eelse kb := kb ;if f > kb then kb := f else kb := kb;if g >kb then kb := gelse kb := kb;if h > kb then kb := helse kb := kb;if i > kb then kb := ielse kb := kb;if j > kb then kb := jelse kb := kb;Label14.Caption := 'Nilai Terbesarnya Adalah';Edit14.Text := FloatToStr(kb);form1.color:=cllime;end;procedure TForm1.Button2Click(Sender: TObject);beginEdit1.Clear;Edit2.Clear; SAMAPAI BERAPA YGDIBUTUHKANLabel11.Caption := '';Label12.Caption := '';Label13.Caption := '';Label14.Caption := '';form1.color:=clyellow;
LINGKARAN
var r : real;Luas, Keliling, Volume : real;beginr := StrToFloat(Edit1.Text);Keliling := 2*pi*r;// Luas := pi*r*rLuas := pi* sqr(r);// Volume := (4 * pi * r * r * r)/3;Volume := (4 * pi * sqr(r) * r)/3;Edit2.Text := FloatToStr(Keliling);Edit3.Text := FloatToStr(Luas);Edit4.Text := FloatToStr(Volume);// Label2.Font := "Palatino Linotype";// Label2.Font.Style := 'Bold';
 
Label2.Font.Size := 12;Label2.Font.Color := clRed;// Edit2.Font.Size := 12;
DISKON BELANJA
var Belanja, Diskon : Real;NH : Char;beginBelanja := StrToFloat(Edit1.Text);if Belanja < 100000 thenBeginDiskon := 0.1*Belanja;Belanja := Belanja - Diskon;endelseBeginDiskon := 0.2*Belanja;Belanja := Belanja - Diskon;end;Label2.Caption := 'Anda cukupmembayar ';Edit2.Text := FloatToStr(Belanja);Edit1.SetFocus;
HARI DALAM BULAN
var Kode_Bulan : integer;beginKode_Bulan := StrToInt(Edit1.Text);case Kode_Bulan of 1,3,5,7,8,10,12 : Label2.Caption :='Jumlah hari adalah 31 hari';4,6,9,11 : Label2.Caption :='Jumlah hari adalah 30 hari';2 : Label2.Caption :='Jumlah hari adalah 28 atau 29 hari';elseLabel2.Caption := 'Andamemasukkan kode bulan yangsalah...!';end;// Edit1.SetFocus;
TAMBAH BAGI KALI
var //x, y, a : byte;x : real;y : real;a : real;beginx := StrToFloat(Edit1.Text);y := StrToFloat(Edit2.Text);a := x * y;Edit3.Text := FloatToStr(a);end;procedure TForm1.Button2Click(Sender: TObject);var //x, y, a : byte;x : byte;

Activity (15)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Nisfir Syahril liked this
Yoshepin Lim liked this
Aida Muflichah liked this
ajengkediri liked this
r1nlin liked this
Ilham Karbela liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->