Monday, January 31, 2011

4

bocoran mini album Little Think (we're coming)

Posted in
Mini album, Sebuah cita - cita yang bukan muncul satu jam sebelum terciptanya mini album tersebut, namun Alif dan Anggit Personil Little think itu telah memikirkannya jauh -jauh hari, bukan hanya saat mereka di Little Think bahkan jauh sebelum terbentuknya Little Think.
Bisa jadi Little Think menjadi jembatan tercapainya cita-cita mereka untuk memperdengarkan karya mereka dan ikut mewarnai dunia musik tanah air setelah sebelumnya menemukan berbagai rintangan untuk menggapainya. Dengan konsep yang lebih matang merekapun yakin mini album ini akan rampung dan siap dinikmati pasar musik nasional maupun internasional.
album ini berisikan 5 lagu, dua diantaranya berbahasa inggris dengan harapan dan tujuan untuk menembus pasar musik internasional.
Singing in The Night,Wake Up, Jln. Jendral Sudirman, Jomblo Tabah, dan Kau Dimana adalah judul-judul lagu yang bisa ditemukan di album ini.
album ini mereka buat sendiri dengan pendirian mereka yang teguh untuk berkreasi sendiri tanpa memohon dan mengemis kepada major label. mereka yakin, mereka dengan indie labelnya mampu membuat mini album yang patut diperhitungkan dan mampu bersaing di belantika musik nasional maupun internasional.
dengarkan lagu-lagunya disini gan!!
(bersambung . . .)

4 comments:

Tuesday, January 11, 2011

0

Project Bilangan Pythagoras Delphi 7

Posted in
.........PHYTAGORAS........
procedure TForm1.Button3Click(Sender: TObject);
var n,i,j,k,a,b,c:integer;
begin
  n:=StrToInt(Edit1.Text);
  For i:=1 to n do
  begin
  For j:=1 to i do
    begin
    for k:=1 to j do
      begin
      a:=i*i;
      b:=j*j+k*k;
      if a=b
      then
        begin
        c:=c+1;
        Listbox1.Items.Add('Bilangan Phytagoras-'+IntToStr(c)+':'+IntToStr(k)+','+IntToStr(j)+','+IntToStr(i));
  end;
  end;
  end;
  end;

end;



end.

0 comments:

0

PROJECT KONVERSI MATA UANG DELPHI 7

Posted in
....KONVERSI MATA UANG......
COMBOBOX1=INPUT, COMBOX2=OUT


procedure TForm1.Button1Click(Sender: TObject);
var x:real;
begin
x := strtofloat(Edit1.Text);

if (combobox1.Text='RUPIAH') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x/9000);
 if (combobox1.Text='RUPIAH') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*9000);

if (combobox1.Text='RUPIAH') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x/6619);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*6619);

if (combobox1.Text='RUPIAH') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/13650);
if (combobox1.Text='EURO') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*13650);

if (combobox1.Text='RUPIAH') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/17076);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*17076);

if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x/0.6994);
 if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x*0.6994);

if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/1.4422);
if (combobox1.Text='EURO') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x*1.4422);

if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/1.8041);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x*1.8041);

if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/2.0618);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='EURO') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x*2.0618);

if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/2.5792);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x*2.5792);

if (combobox1.Text='EURO') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/1.251);
if (combobox1.Text='EURO') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x*1.251);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/1);


end;

procedure TForm1.Button2Click(Sender: TObject);
begin
application.Terminate;
end;

end.

0 comments:

0

PROJECT BILANGAN FIBONACCI DELPHI 7

Posted in
........FIBONACCI..........

procedure TForm1.Button1Click(Sender: TObject);
Var i,n,a,b,c:Integer;
begin
   n:=StrToInt(Edit1.Text);
   a:=1;
   b:=1;
   ListBox1.Items.Add('Bil.Fibonacci ke-1=1');
   ListBox1.Items.Add('Bil.Fibonacci ke-2=1');
   for i:=3 to n do
   begin
   c:=a+b;
   ListBox1.Items.Add('Bil.Fibonacci ke-'+IntToStr(i)+'='+IntToStr(c));
   a:=b;
   b:=c;
   end;
end;


END.

0 comments:

0

PROJECT DEKOMPOSISI N BUAH BILANGAN (DELPHI 7)

Posted in
..............DEKOMPOSISI BILANGAN N.........

procedure TForm1.Button1Click(Sender: TObject);
var i,a,b:integer;
        k:real;
begin
    a:=StrToInt(Edit1.Text);
    i:=2;
    b:=a;
    while i<=a do
    begin
    if b mod i=0
    then
    begin
    Listbox1.Items.Add(IntToStr(i));
    k:=b/i;
    b:=trunc(k);
    end
    else i:=1+i;
    end;

end;

end.

0 comments:

0

PROJECT BILANGAN PRIMA SEBANYAK N (DELPHI 7)

.......BILANGAN PRIMA SEBANYAK n......
EDIT1=MASUKAN,LISTBOX1=KELUARAN

procedure TForm1.Button1Click(Sender: TObject);
var i,a,b,c,d:integer;
            p:boolean;
begin
    a:=StrToInt(Edit1.Text);
    For b:=2 to 1000 do
    begin
    i:=2;
    p:=true;
    while(i<=b-1)and p do
       begin
       c:=b mod i;
       if c=0 then p:=false;
       i:=i+1;
       end;
    if Listbox1.Items.count<a then
    if p=true then
    Listbox1.Items.Add('Bilangan Prima ke-'+IntToStr(Listbox1.Items.count+1)+'='+IntToStr(b));
    end;
end;


end.

0 comments:

0

PROJECT BILANGAN PRIMA (DELPHI 7)

Posted in
.........BIL. PRIM ATAU BUKAN.........
EDIT1=MASUKAN, EDIT 2= KETERANGAN

procedure TForm1.Button1Click(Sender: TObject);
var n,i,s:integer;
    p:boolean;
begin
    n:=StrToInt(Edit1.Text);
    i:=2;
    P:=True ;
    while (i<=n-1) and p do
    begin
    s:=n mod i;
    if s=0 then p:=false;
    i:=i+1;
    end;

    if p=true
    then Edit2.Text:='  Bilangan Prima'
    else Edit2.Text:='  Bilangan Komposit';
    if n=1
    then Edit2.Text:='  Bilangan Komposit';
    if n=0
    then Edit2.Text:='  Bilangan Komposit';
end;


end.

0 comments:

0

PROJECT ALJABAR HIMPUNAN (DELPHI 7)

Posted in
........ALJABAR HIMPUNAN..........
LISTBOX1=INPUT DATA A, LISTBOX2=AnB,
LISTBOX3=AUB, LISTBOX4=A+B, LISTBOX5=A-B
LISBOX6=INPUTB

procedure TForm1.Button8Click(Sender: TObject);  //SELESAI
begin
  close;
end;

procedure TForm1.Button7Click(Sender: TObject); //HAPUS
begin
edit1.Clear; edit2.Clear;
listbox1.Clear; listbox2.Clear; listbox3.Clear; listbox4.Clear;
listbox5.Clear; listbox6.Clear;

end;

procedure TForm1.Button1Click(Sender: TObject); //>>
begin
with ListBox1.Items do
Add(Edit1.Text);
Edit1.Text:='';
end;


procedure TForm1.Button6Click(Sender: TObject); //<<
begin
with ListBox6.Items do
Add(Edit2.Text);
Edit2.Text:='';
 end;
procedure TForm1.Button2Click(Sender: TObject);//AnB
Var i,j:Integer;
    A,B:Array[0..10] of String;
begin
    For i:=0 to ListBox1.Items.Count-1 do
    A[i]:=ListBox1.Items[i];
    For j:=0 to ListBox6.Items.Count-1 do
    B[j]:=ListBox6.Items[j];
    For i:=0 to ListBox1.Items.Count-1 do
    begin
    For j:=0 to ListBox6.Items.Count-1 do
    if A[i]=B[j] then ListBox2.Items.Add(A[i]);
    end;
    end;

procedure TForm1.Button3Click(Sender: TObject); //AUB
Var i,j:Integer;
    A,B:Array[0..100] of String;
    ada:Boolean;
begin
    For i:=0 to ListBox1.Items.Count-1 do
    A[i]:=ListBox1.Items[i];
    For j:=0 to ListBox6.Items.Count-1 do
    B[j]:=ListBox6.Items[j];
    For i:=0 to ListBox1.Items.Count-1 do
    ListBox3.Items.Add(A[i]);
    For j:=0 to ListBox6.Items.Count-1 do
    begin
    ada:=false;
    For i:=0 to ListBox1.Items.Count-1 do
    if A[i]=B[j] then ada:=true;
    if ada=false then ListBox3.Items.Add(B[j]);
end;
end;
procedure TForm1.Button4Click(Sender: TObject); //A+B
Var i,j:Integer;
    A,B:Array[0..100] of String;
    ada:Boolean;
begin
    For i:=0 to ListBox1.Items.Count-1 do
    A[i]:=ListBox1.Items[i];
    For j:=0 to ListBox6.Items.Count-1 do
    B[j]:=ListBox6.Items[j];
    For i:=0 to ListBox1.Items.Count-1 do
    begin
    ada:=false;
    For j:=0 to ListBox6.Items.Count-1 do
    if A[i]=B[j] then ada:=true;
    if ada=false then ListBox4.Items.Add(A[i]);
    end;
    For j:=0 to ListBox6.Items.Count-1 do
    begin
    ada:=false;
    For i:=0 to ListBox1.Items.Count-1 do
    if A[i]=B[j] then ada:=true;
    if ada=false then ListBox4.Items.Add(B[j]);
end;
end;


procedure TForm1.Button5Click(Sender: TObject); //A-B
Var i,j:Integer;
    A,B:Array[0..100] of String;
    ada:Boolean;
begin
    For i:=0 to ListBox1.Items.Count-1 do
    A[i]:=ListBox1.Items[i];
    For j:=0 to ListBox6.Items.Count-1 do
    B[j]:=ListBox6.Items[j];
    For i:=0 to ListBox1.Items.Count-1 do
    begin
    ada:=false;
    For j:=0 to ListBox6.Items.Count-1 do
    if A[i]=B[j] then ada:=true;
    if ada=false then ListBox5.Items.Add(A[i]);
end;
end;
end.

0 comments:

0

PROJECT MENGURUTKAN KELIPATAN A KURANG DARI B (DELPHI 7)

Posted in
............URUT KELIPATAN A KURANG DARI B.........

procedure TForm1.Button1Click(Sender: TObject);
var a,b,i:integer;
begin
   a:=strtoint(edit1.text);
   b:=strtoint(edit2.text);
   i:=0;

   while i<b-a do
   begin
   with listbox1.items do
   i:=i+a;
   listbox1.Items.add(inttostr(i));
   end;
end;

end.

0 comments:

0

PROJECT MENGURUTKAN BILANGAN DARI BESAR KE KECIL (DELPHI 7)

Posted in
.........URUTIN BESAR-KECIL.........
BIL.PER=EDIT1, BIL2=EDIT2, BIL3=EDIT3


procedure TForm1.Button1Click(Sender: TObject);
var x,y,z: integer ;
begin
  x:=strtoint(edit1.Text);
  y:=strtoint(edit2.Text);
  z:=strtoint(edit3.Text);

  if (x>y) and (y>z)then
  begin
  listbox1.Items.Add(inttostr(z));
  listbox1.Items.Add(inttostr(y));
  listbox1.Items.Add(inttostr(x));
   end
   else

  if (x>y) and (y<z) and (x>z) then
  begin
  listbox1.Items.Add(inttostr(y));
  listbox1.Items.Add(inttostr(z));
  listbox1.Items.Add(inttostr(x));
   end
   else

   if (y>x) and (x>z)then
  begin
  listbox1.Items.Add(inttostr(z));
  listbox1.Items.Add(inttostr(x));
  listbox1.Items.Add(inttostr(y));
   end
   else

   if (x<y) and (y>z) and (z>x) then
  begin
  listbox1.Items.Add(inttostr(x));
  listbox1.Items.Add(inttostr(z));
  listbox1.Items.Add(inttostr(y));
   end
   else

   if (z>y) and (y>x)then
  begin
  listbox1.Items.Add(inttostr(x));
  listbox1.Items.Add(inttostr(y));
  listbox1.Items.Add(inttostr(z));
   end
   else

   if (z>y) and (y<x) and (x<z)then
  begin
  listbox1.Items.Add(inttostr(y));
  listbox1.Items.Add(inttostr(x));
  listbox1.Items.Add(inttostr(z));
   end
   else

 showmessage('ada dua atau lebih bilangan yang sama')
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
 listbox1.clear; edit1.Clear; edit2.Clear;edit3.clear;
end;

end.

0 comments:

0

PROJECT KONVERSI NILAI, BULAN DAN SUHU (DELPHI 7)

Posted in
.............KONVERSI NILAI, BULAN, SUHU.................

procedure TForm1.Button1Click(Sender: TObject);
var x:real ;
begin
 x:=strtofloat(edit1.Text);
 if x>100 then showmessage('anda salah')else
 if x>=85 then edit2.Text:='A' else
 if x>=70 then edit2.Text:='B' else
 if x>=55 then edit2.Text:='C' else
 if x>=40 then edit2.Text:='D' else
               edit2.Text:= 'gagal'

end;

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

procedure TForm1.Button2Click(Sender: TObject);
begin
edit1.Clear; edit2.clear;
end;

end.

..........KONVERSI BULAN............
procedure TForm1.Button1Click(Sender: TObject);
var x: integer;
begin
x:=strtoint(edit1.Text);

case x of
     1: edit2.Text:='Januari';
     2: edit2.Text:='Februari';
     3: edit2.Text:='Maret';
     4: edit2.Text:='April';
     5: edit2.Text:='Mei';
     6: edit2.Text:='Juni';
     7: edit2.Text:='Juli';
     8: edit2.Text:='Agustus';
     9: edit2.Text:='September';
     10: edit2.Text:='Oktober';
     11: edit2.Text:='November';
     12: edit2.Text:='Desember';

end; 
end;

end.

..........KONVERSI SUHU........
procedure TForm1.Button1Click(Sender: TObject);
  var x:real;
begin
  x:=strtofloat(edit1.text);

  if x>=100 then edit2.Text:='UAP'else
  if x>=0 then edit2.Text:='CAIR'else
  if x<0 then edit2.Text:='PADAT';
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
EDIT2.Text:='';
EDIT1.Text:='';
end;

end.

0 comments:

1

PROJECT ANIMASI (DELPHI 7)

Posted in
................ANIMASI (569,217).......................

procedure Tunda(Detik,MiliDetik:word);
var
  TimeOut: TDateTime;
begin
  TimeOut:=Now+EncodeTime(0,Detik div 60, Detik mod 60, MiliDetik);
  while Now<TimeOut do
    Application.ProcessMessages;
    end;

procedure TForm1.Button1Click(Sender: TObject);
var i:integer;
begin

   with Image1.Canvas do
   begin
   Pen.Width:=3;
   Brush.Color:=clbtnface;
   Pen.Color:=clbtnface;
   Rectangle(0,0,569,217); //layar
   end;

   with Image1.Canvas do
   begin
   Pen.Width:=3;
   Pen.Color:=clblack;
   RoundRect(120,8,430,22,7,7);  //AC
   RoundRect(58,22,504,180,20,20); //body bus
   Rectangle(180,135,351,180)  //bagasi
   end;

   with Image1.Canvas do
   begin
   Brush.Color:=claqua;
   Rectangle(58,95,504,99); //hiasan warna
   Brush.Color:=cllime;
   Rectangle(151,116,504,126); //hiasan warna
   Brush.Color:=clyellow;
   Rectangle(292,168,504,173); //hiasan warna

   Brush.Color:=clred;
   Rectangle(208,142,504,158); //hiasan warna
   end;

   with Image1.Canvas do
   begin
   Brush.Color:=clgray;
   Ellipse(107,162,153,208); //ban hareup
   Ellipse(381,162,428,208); //ban tukang
   Brush.Color:=clsilver;
   Ellipse(121,174,141,195); //pelk
   Ellipse(395,174,416,195); //pelk
   end;


   with Image1.Canvas do
   begin
   Brush.Color:=clblue;
   RoundRect(473,8,502,18,10,10);  //racing na tah
   end;
       //animasi mengecat
      with Image1.Canvas do
      begin
      Brush.Color:=clwhite;
      RoundRect(58,22,504,180,20,20); //body bus
      Pen.Color:=clblue;
      for i:=1 to 440 do
      begin
      MoveTo(61,25);
      LineTo(61,177);
      MoveTo(61+i,25);
      LineTo(61+i,177);
      Tunda(0,10);
      end;
      end;

   //animasi AC
   with Image1.Canvas do
   begin
   Pen.Width:=3;
   Pen.Color:=clblack;
   RoundRect(120,8,430,22,7,7);  //AC
   Pen.Color:=clmedgray;
      for i:=1 to 303 do
      begin
      MoveTo(123,11);
      LineTo(123,19);
      MoveTo(123+i,11);
      LineTo(123+i,19);
      Tunda(0,10);
      end;
      end;

   with Image1.Canvas do
   begin
   Pen.Color:=clblack;
   RoundRect(58,40,71,95,20,2);     //kaca
   RoundRect(156,40,208,95,20,20);  //kaca
   RoundRect(217,40,269,95,20,20);  //kaca
   RoundRect(280,40,332,95,20,20);  //kaca
   RoundRect(341,40,393,95,20,20);  //kaca
   RoundRect(479,40,504,95,2,20);  //kaca
   Brush.Color:=clblue;
   Rectangle(180,135,351,180); //bagasi
   end;
  
   with Image1.Canvas do
   begin
   Pen.Width:=3;
   Pen.Color:=clblack;
   Brush.Color:=clblue;
   Rectangle(79,29,151,158); //pintu depan
   Rectangle(395,29,467,158); //pintu belakang
   Brush.Color:=clwhite;
   Rectangle(89,34,144,95);    //kaca panto
   Rectangle(405,34,460,95);    //kaca panto
   end;

     //animasi hiasan warna aqua
  with Image1.Canvas do
   begin
   Pen.Width:=1;
   Brush.Color:=clwhite;
   Rectangle(58,95,504,99); //hiasan warna
   Pen.Color:=claqua;
   for i:=1 to 443 do
      begin
      MoveTo(59,96);
      LineTo(59,98);
      MoveTo(59+i,96);
      LineTo(59+i,98);
      Tunda(0,10);
      end;
      end;

      //animasi hiasan warna ijo
  with Image1.Canvas do
   begin
   Pen.Width:=1;
   Brush.Color:=clwhite;
   Rectangle(151,116,504,126); //hiasan warna
   Pen.Color:=cllime;
   for i:=1 to 353 do
      begin
      MoveTo(152,117);
      LineTo(152,125);
      MoveTo(152+i,117);
      LineTo(152+i,125);
      Tunda(0,10);
      end;
      end;

       //animasi hiasan warna merah
  with Image1.Canvas do
   begin
   Pen.Width:=1;
   Brush.Color:=clwhite;
   Rectangle(208,142,504,158); //hiasan warna
   Pen.Color:=clred;
   for i:=1 to 295 do
      begin
      MoveTo(209,143);
      LineTo(209,157);
      MoveTo(209+i,143);
      LineTo(209+i,157);
      Tunda(0,10);
      end;
      end;

      //animasi hiasan warna kuning
  with Image1.Canvas do
   begin
   Pen.Width:=1;
   Brush.Color:=clwhite;
   Rectangle(292,168,504,173); //hiasan warna
   Pen.Color:=clyellow;
   for i:=1 to 213 do
      begin
      MoveTo(291,169);
      LineTo(291,172);
      MoveTo(291+i,169);
      LineTo(291+i,172);
      Tunda(0,10);
      end;
      end;


    with Image1.Canvas do
   begin
   Pen.Width:=3;
   Pen.Color:=clblack;
   Brush.Color:=clgray;
   Ellipse(107,162,153,208); //ban hareup
   Ellipse(381,162,428,208); //ban tukang
   Brush.Color:=clsilver;
   Ellipse(121,174,141,195); //pelk
   Ellipse(395,174,416,195); //pelk
   Brush.Color:=clbackground;
   Ellipse(136,109,148,120); //gagang panto
   Ellipse(452,109,464,120); //gagang panto belakang
   Pen.Color:=clblack;
   Brush.Color:=clblack;
   Rectangle(453,180,460,193);    //knalpot
   RoundRect(453,188,481,199,2,20);  //knalpot
   end;

  
 //kata-kata
  with Image1.Canvas do
   begin
    Brush.Style:=bsClear;
    Brush.Color:=clblue;
    Font.Color:=clmaroon;
    Font.Name:='Arial';
    Font.Style:=[fsbold];
    Font.Size:=20;
    TextOut(170,102,'DOELF_PRODUCT');
   end;
   end;
procedure TForm1.Button2Click(Sender: TObject);
begin
  close;
end;

end.

1 comments:

0

project statistika (DELPHI 7)

Posted in
........................STATISTIKA...................................

procedure TForm1.Button1Click(Sender: TObject); //>>
begin
with ListBox1.Items do
Add(Edit1.Text);
Edit1.Text:='';
end;

procedure TForm1.Button3Click(Sender: TObject); //SELESAI
begin
  close;
end;

procedure TForm1.Button4Click(Sender: TObject); //BANYAK DATA
begin
Edit2.Text:=IntToStr(ListBox1.Items.Count);
end;

procedure TForm1.Button5Click(Sender: TObject); //JUMLAH
var A:array[0..100] of Integer;
    i,jml:Integer;
begin
    for i:=0 to ListBox1.Items.Count-1 do
    A[i]:=StrToInt(ListBox1.Items[i]);
    jml:=0;
    for i:=0 to ListBox1.Items.Count-1 do
    jml:=jml+A[i];
    Edit3.Text:=IntToStr(jml);
end;


procedure TForm1.Button8Click(Sender: TObject); //MIN
var A:array[0..100] of Integer;
    i,M:Integer;
begin
    for i:=0 to ListBox1.Items.Count-1 do
    A[i]:=StrToInt(ListBox1.Items[i]);
    M:=A[0];
    for i:=0 to ListBox1.Items.Count-1 do
    If M>A[i] then M:=A[i];
    Edit6.Text:=IntToStr(M);
end;

procedure TForm1.Button6Click(Sender: TObject); //RATA-RATA
var A:array[0..100] of Integer;
    i,jml,n:Integer;
    z:Real;
begin
    for i:=0 to ListBox1.Items.Count-1 do
    A[i]:=StrToInt(ListBox1.Items[i]);
    jml:=0;
    for i:=0 to ListBox1.Items.Count-1 do
    jml:=jml+A[i];
    n:=ListBox1.Items.Count;
    z:=jml/n;
    Edit4.Text:=FloatToStr(z);

end;

procedure TForm1.Button7Click(Sender: TObject);//MAX
var A:array[0..100] of Integer;
    i,N:Integer;
begin
    for i:=0 to ListBox1.Items.Count-1 do
    A[i]:=StrToInt(ListBox1.Items[i]);
    N:=A[0];
    for i:=0 to ListBox1.Items.Count-1 do
    If N<A[i] then N:=A[i];
    Edit5.Text:=IntToStr(N);
end;


procedure TForm1.Button9Click(Sender: TObject); //JANGKAUAN
Var x,y,z:integer;
begin
x:=strtoint(edit5.text);
y:=strtoint(edit6.text);
z:=x-y;
edit7.Text:=inttostr(z);
end;

procedure TForm1.Button11Click(Sender: TObject);  //MEDIAN
var
  a: array [0..100] of Integer;
  i,jml,k:Integer;
  l,m,o:Integer;
  n:Real;
begin
  k:=StrToInt(edit2.text) div 2;
  l:=StrToInt(edit2.text) mod 2;
  if l=0 then
  begin
    m:=k;
    n:=(StrToFloat(ListBox2.Items[m])+StrToInt(ListBox2.Items[k-1]))/2;
    Edit5.Text:=FloatToStr(n);
  end
  else
  begin
  o:=StrToInt(listBox2.Items[k]);
  Edit8.Text:=IntToStr(o);

end;
end;

procedure TForm1.Button10Click(Sender: TObject);  //DATA TERURUT
var A:array[0..100] of Integer;
    i,j,k:Integer;
begin
    for i:=0 to ListBox1.Items.Count-1 do
    A[i]:=StrToInt(ListBox1.Items[i]);
    for i:=0 to ListBox1.Items.Count-1 do
    for j:=0 to i do
    if A[i]<A[j]
    then begin
    k:=A[i];
    A[i]:=A[j];
    A[j]:=k;
    end;
    for i:=0 to ListBox1.Items.Count-1 do
    ListBox2.Items.Add(IntToStr(A[i]));
end;


procedure TForm1.Button2Click(Sender: TObject);  //HAPUS
begin
 edit1.clear;edit2.Clear;edit3.clear;edit4.Clear;
 edit5.Clear; edit6.clear;edit7.Clear;edit8.clear;
 edit9.Clear;
 listbox1.Clear;listbox2.Clear;
end;

procedure TForm1.Button12Click(Sender: TObject);  //MODUS
var
  p,q,s,r,i,jml,jml2:integer;

begin
    r:=strtoint(edit2.Text);
    jml:=0;
    jml2:=0;
    p:=strtoint(listbox2.Items[0]);
  for i:=0 to r-2 do
  begin
    q:=strtoint(listbox2.Items[i+1]);
    if p=q then
    begin
      jml:=jml+1;
    end
    else
    begin
       jml2:=jml;
       jml:=0;
       p:= strtoint(listbox2.Items[i+1]);
    end;

if jml>jml2 then
  begin
    s:=strtoint(listbox2.Items[i]);
  end

  end ;
  edit9.Text:=inttostr(s);

end;

end.

0 comments:

0

PROJECT TRIGONOMETRI (DELPHI 7)

Posted in
..............TRIGONOMETRI (image 617,329)...................................

Function Absis (x:double):integer;
begin
   result:= round (x+300);
end;

Function ordinat (y:double):integer;
begin
   result:= round (165-y);
end;

procedure TForm1.Button1Click(Sender: TObject);  //KORDINAT
begin
   with image1.Canvas do
   begin
   Pen.Width:=3;
   Pen.Color:=clblue;
   Font.Color:=clblue;
   Font.Name:='Time New Roman';
   Font.Size:=12;

   MoveTo(Absis(-250),Ordinat(0));  //sumbu x
   LineTo(Absis(250),Ordinat(0));
   Font.Color:=clred;
   TextOut(Absis(240),Ordinat(20),'x');

   MoveTo(Absis(0),Ordinat(145));  //sumbuy
   LineTo(Absis(0),Ordinat(-145));
   Font.Color:=clred;
   TextOut(Absis(4),Ordinat(148),'y');
   TextOut(Absis(5),Ordinat(-5),'O');

   Font.Size:=12;
   Font.Style:=[fsBold];         //bold
   TextOut(Absis(80),Ordinat(-5),'180');
   TextOut(Absis(200),Ordinat(-5),'360');
   TextOut(Absis(-125),Ordinat(-5),'-180');
   TextOut(Absis(-200),Ordinat(-5),'-360');
   TextOut(Absis(5),Ordinat(85),'1');
   TextOut(Absis(4),Ordinat(-60),'-1');
   end;
   end;
procedure TForm1.Button3Click(Sender: TObject);  //SIN
var i:real;
begin
   with image1.Canvas do
   begin
   Font.Color:=clgreen;
   Font.Size:=12;
   i:=-200;
   while i<=200 do
     begin
     Pixels[Absis(i),Ordinat(70*Sin(i*2*3.14/200))]:=clgreen;
     i:=i+0.03;
     TextOut(Absis(185),Ordinat(-40),'y = sin x');
     end;
end;

end;

procedure TForm1.Button4Click(Sender: TObject); //COS
var i:real;
begin
    with image1.Canvas do
   begin
   Font.Color:=clBlue;
   Font.Size:=12;
   i:=-200;
   while i<=200 do
     begin
     Pixels[Absis(i),Ordinat(70*Cos(i*2*3.14/200))]:=clred;
     i:=i+0.03;
     TextOut(Absis(200),Ordinat(70),'y = cos x');
     end;
     end;
     end;

end.

0 comments:

0

PROJECT PERSAMAAN KUADRAT (DELPHI 7)

Posted in
.....................PERSAMAAN KUARAT......................................

X1=EDIT1,X2=EDIT2, A=EDIT3,B=EDIT4,C=EDIT5, KET,EDIT6

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

procedure TForm1.Button1Click(Sender: TObject); //HITUNG
 Var
    a,b,c,D,m,n,q:Real;
    x1,x2:Real;
begin
    a:=StrToFloat(Edit3.Text);
    b:=StrToFloat(Edit4.Text);
    c:=StrToFloat(Edit5.Text);
    D:=b*b-4*a*c;
    if D>0 then
begin
    x1:=(-b+sqrt(D))/(2*a);
    Edit1.Text:=FloatToStr(x1);
    x2:=(-b-sqrt(D))/(2*a);
    Edit2.Text:=FloatToStr(x2);
    Edit6.Text:='Dua akar Berbeda';
end;
    if D=0 then
begin
    x1:=(-b/(2*a));
    Edit1.Text:=FloatToStr(x1);
    x2:=(-b/(2*a));
    Edit2.Text:=FloatToStr(x2);
    Edit6.Text:='Dua Akar Kembar';
end;
    if D<0 then
begin
    m:=-1*D;
    n:=(-b/(2*a));
    q:=(sqrt(m)/(2*a));
    Edit1.Text:=FloatToStr(n)+'+'+FloatToStr(q)+'i';
    Edit2.Text:=FloatToStr(n)+'-'+FloatToStr(q)+'i';
    Edit6.Text:='Dua Akar Imajiner';
end;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
  edit3.clear; edit4.Clear; edit5.clear;
end;

end.

0 comments:

0

PROJECT KALKULATOR (DELPHI 7)

Posted in
.............KALKULATOR..........................

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

procedure TForm1.Button1Click(Sender: TObject);
begin
  edit1.Clear; edit2.Clear; edit3.Clear;
end;

procedure TForm1.Button10Click(Sender: TObject);  //ln n
Var x,z:Real;
begin
    x:=StrToFloat(Edit2.Text);
    Z:=ln(x);
    Edit1.Text:=FloatToStr(z);
    Edit3.Text:='';
end;

procedure TForm1.Button11Click(Sender: TObject);  //1/n
var x,z:real ;
begin
     x:=strtofloat(edit2.Text);
     z:=1/x;
     edit1.Text:=floattostr(z);
     Edit3.Text:='';
end;

procedure TForm1.Button22Click(Sender: TObject);
begin
  edit2.Text:=edit2.Text+button23.Caption;
end;

procedure TForm1.Button28Click(Sender: TObject);
begin
  edit2.Text:=edit2.Text+ '-';
end;

procedure TForm1.Button7Click(Sender: TObject);  //tambah
Var x,y,z:Real;
begin
    x:=StrToFloat(Edit2.Text);
    y:=StrToFloat(Edit3.Text);
    Z:=x+y;
    Edit1.Text:=FloatToStr(z);

end;

procedure TForm1.Button6Click(Sender: TObject); //kurang
Var x,y,z:Real;
begin
    x:=StrToFloat(Edit2.Text);
    y:=StrToFloat(Edit3.Text);
    Z:=x-y;
    Edit1.Text:=FloatToStr(z);

end;

procedure TForm1.Button5Click(Sender: TObject);  //kali
Var x,y,z:Real;
begin
    x:=StrToFloat(Edit2.Text);
    y:=StrToFloat(Edit3.Text);
    Z:=x*y;
    Edit1.Text:=FloatToStr(z);

end;

procedure TForm1.Button8Click(Sender: TObject);  //sqrt
Var x,z:Real;
begin
    x:=StrToFloat(Edit2.Text);
    Z:=exp((1/2)*ln(x));
    Edit1.Text:=FloatToStr(z);
    Edit3.Text:='';

end;

procedure TForm1.Button4Click(Sender: TObject);  //bagi
Var x,y,z:Real;
begin
    x:=StrToFloat(Edit2.Text);
    y:=StrToFloat(Edit3.Text);
    Z:=x/y;
    Edit1.Text:=FloatToStr(z);

end;

procedure TForm1.Button9Click(Sender: TObject); //nlogk
Var x,y,z:Real;
begin
    x:=StrToFloat(Edit2.Text);
    y:=StrToFloat(Edit3.Text);
    Z:=ln(y)/ln(x);
    Edit1.Text:=FloatToStr(z);

end;

procedure TForm1.Button13Click(Sender: TObject);  //n^k
Var x,y,z:Real;
begin
    x:=StrToFloat(Edit2.Text);
    y:=StrToFloat(Edit3.Text);
    Z:=exp(y*ln(x));
    Edit1.Text:=FloatToStr(z);

end;

procedure TForm1.Button14Click(Sender: TObject); //nCk
var a,b,i,n,r,z,j:Integer;
    t:Real;
begin
  a:=StrToInt(Edit2.Text);
  b:=StrToInt(Edit3.Text);
  n:=1;
  r:=1;
  z:=1;
  j:=a-b;

For i:=1 to a do
  n:=i*n;
Begin
For i:=1 to j do
  r:=i*r;
End;
Begin
  For i:=1 to b do
  z:=i*z;
End;
  t:=n/(z*r);
  Edit1.Text:=FloatToStr(t);
if a<b then Edit1.Text:='Error';

end;

procedure TForm1.Button19Click(Sender: TObject);  //nPk
var a,b,i,n,r,z,j:Integer;
    t:Real;
begin
   a:=StrToInt(Edit2.Text);
    b:=StrToInt(Edit3.Text);
    n:=1;
    r:=1;
    j:=a-b;
    For i:=1 to a do
        n:=i*n;
        Begin
        For i:=1 to j do
            r:=i*r;
        End;
    t:=n/r;
    Edit1.Text:=FloatToStr(t);
    if a<b then Edit1.Text:='Error';

end;

procedure TForm1.Button18Click(Sender: TObject);  //n!
var a,i,f:Integer;
begin
    a:=StrToInt(Edit2.Text);
    f:=1;
    for i:=1 to a do
    f:=f*i;
    Edit1.Text:=IntToStr(f);
    Edit3.Text:='';

end;

procedure TForm1.Button23Click(Sender: TObject); //n pnkt2
Var x,z:Real;
begin
    x:=StrToFloat(Edit2.Text);
    Z:=exp(2*ln(x));
    Edit1.Text:=FloatToStr(z);
    Edit3.Text:='';

end;

procedure TForm1.Button25Click(Sender: TObject);  //tan
var a,c:real;
begin
  a:=strtofloat(edit2.Text);
  c:=sin((a*pi)/180)/cos((a*pi)/180);
  edit1.Text:=floattostr(c);
  edit3.Text:='';
end;

procedure TForm1.Button26Click(Sender: TObject);  //cos
var a,c : real;
begin
 a:=strtofloat(edit2.Text);
 c:=cos((a*pi)/180);
 edit1.Text:=floattostr(c);
 edit3.Text:='';
end;

procedure TForm1.Button24Click(Sender: TObject);  //sin
var a,c:real ;
begin
 a:=strtofloat(edit2.Text);
 c:=sin((a*pi)/180);
 edit1.Text:=floattostr(c);
 edit3.Text:='';
end;

end.

0 comments:

0

prokom rada jangar

Posted in
........ALJABAR HIMPUNAN..........
LISTBOX1=INPUT DATA A, LISTBOX2=AnB,
LISTBOX3=AUB, LISTBOX4=A+B, LISTBOX5=A-B
LISBOX6=INPUTB

procedure TForm1.Button8Click(Sender: TObject);  //SELESAI
begin
  close;
end;

procedure TForm1.Button7Click(Sender: TObject); //HAPUS
begin
edit1.Clear; edit2.Clear;
listbox1.Clear; listbox2.Clear; listbox3.Clear; listbox4.Clear;
listbox5.Clear; listbox6.Clear;

end;

procedure TForm1.Button1Click(Sender: TObject); //>>
begin
with ListBox1.Items do
Add(Edit1.Text);
Edit1.Text:='';
end;


procedure TForm1.Button6Click(Sender: TObject); //<<
begin
with ListBox6.Items do
Add(Edit2.Text);
Edit2.Text:='';
 end;
procedure TForm1.Button2Click(Sender: TObject);//AnB
Var i,j:Integer;
    A,B:Array[0..10] of String;
begin
    For i:=0 to ListBox1.Items.Count-1 do
    A[i]:=ListBox1.Items[i];
    For j:=0 to ListBox6.Items.Count-1 do
    B[j]:=ListBox6.Items[j];
    For i:=0 to ListBox1.Items.Count-1 do
    begin
    For j:=0 to ListBox6.Items.Count-1 do
    if A[i]=B[j] then ListBox2.Items.Add(A[i]);
    end;
    end;

procedure TForm1.Button3Click(Sender: TObject); //AUB
Var i,j:Integer;
    A,B:Array[0..100] of String;
    ada:Boolean;
begin
    For i:=0 to ListBox1.Items.Count-1 do
    A[i]:=ListBox1.Items[i];
    For j:=0 to ListBox6.Items.Count-1 do
    B[j]:=ListBox6.Items[j];
    For i:=0 to ListBox1.Items.Count-1 do
    ListBox3.Items.Add(A[i]);
    For j:=0 to ListBox6.Items.Count-1 do
    begin
    ada:=false;
    For i:=0 to ListBox1.Items.Count-1 do
    if A[i]=B[j] then ada:=true;
    if ada=false then ListBox3.Items.Add(B[j]);
end;
end;
procedure TForm1.Button4Click(Sender: TObject); //A+B
Var i,j:Integer;
    A,B:Array[0..100] of String;
    ada:Boolean;
begin
    For i:=0 to ListBox1.Items.Count-1 do
    A[i]:=ListBox1.Items[i];
    For j:=0 to ListBox6.Items.Count-1 do
    B[j]:=ListBox6.Items[j];
    For i:=0 to ListBox1.Items.Count-1 do
    begin
    ada:=false;
    For j:=0 to ListBox6.Items.Count-1 do
    if A[i]=B[j] then ada:=true;
    if ada=false then ListBox4.Items.Add(A[i]);
    end;
    For j:=0 to ListBox6.Items.Count-1 do
    begin
    ada:=false;
    For i:=0 to ListBox1.Items.Count-1 do
    if A[i]=B[j] then ada:=true;
    if ada=false then ListBox4.Items.Add(B[j]);
end;
end;


procedure TForm1.Button5Click(Sender: TObject); //A-B
Var i,j:Integer;
    A,B:Array[0..100] of String;
    ada:Boolean;
begin
    For i:=0 to ListBox1.Items.Count-1 do
    A[i]:=ListBox1.Items[i];
    For j:=0 to ListBox6.Items.Count-1 do
    B[j]:=ListBox6.Items[j];
    For i:=0 to ListBox1.Items.Count-1 do
    begin
    ada:=false;
    For j:=0 to ListBox6.Items.Count-1 do
    if A[i]=B[j] then ada:=true;
    if ada=false then ListBox5.Items.Add(A[i]);
end;
end;
end.

.........BIL. PRIM ATAU BUKAN.........
EDIT1=MASUKAN, EDIT 2= KETERANGAN

procedure TForm1.Button1Click(Sender: TObject);
var n,i,s:integer;
    p:boolean;
begin
    n:=StrToInt(Edit1.Text);
    i:=2;
    P:=True ;
    while (i<=n-1) and p do
    begin
    s:=n mod i;
    if s=0 then p:=false;
    i:=i+1;
    end;

    if p=true
    then Edit2.Text:='  Bilangan Prima'
    else Edit2.Text:='  Bilangan Komposit';
    if n=1
    then Edit2.Text:='  Bilangan Komposit';
    if n=0
    then Edit2.Text:='  Bilangan Komposit';
end;


end.

.......BILANGAN PRIMA SEBANYAK n......
EDIT1=MASUKAN,LISTBOX1=KELUARAN

procedure TForm1.Button1Click(Sender: TObject);
var i,a,b,c,d:integer;
            p:boolean;
begin
    a:=StrToInt(Edit1.Text);
    For b:=2 to 1000 do
    begin
    i:=2;
    p:=true;
    while(i<=b-1)and p do
       begin
       c:=b mod i;
       if c=0 then p:=false;
       i:=i+1;
       end;
    if Listbox1.Items.count<a then
    if p=true then
    Listbox1.Items.Add('Bilangan Prima ke-'+IntToStr(Listbox1.Items.count+1)+'='+IntToStr(b));
    end;
end;


end.

..............DEKOMPOSISI BILANGAN N.........

procedure TForm1.Button1Click(Sender: TObject);
var i,a,b:integer;
        k:real;
begin
    a:=StrToInt(Edit1.Text);
    i:=2;
    b:=a;
    while i<=a do
    begin
    if b mod i=0
    then
    begin
    Listbox1.Items.Add(IntToStr(i));
    k:=b/i;
    b:=trunc(k);
    end
    else i:=1+i;
    end;

end;

end.

........FIBONACCI..........

procedure TForm1.Button1Click(Sender: TObject);
Var i,n,a,b,c:Integer;
begin
   n:=StrToInt(Edit1.Text);
   a:=1;
   b:=1;
   ListBox1.Items.Add('Bil.Fibonacci ke-1=1');
   ListBox1.Items.Add('Bil.Fibonacci ke-2=1');
   for i:=3 to n do
   begin
   c:=a+b;
   ListBox1.Items.Add('Bil.Fibonacci ke-'+IntToStr(i)+'='+IntToStr(c));
   a:=b;
   b:=c;
   end;
end;


END.

....KONVER UANG......
COMBOBOX1=INPUT, COMBOX2=OUT


procedure TForm1.Button1Click(Sender: TObject);
var x:real;
begin
x := strtofloat(Edit1.Text);

if (combobox1.Text='RUPIAH') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x/9000);
 if (combobox1.Text='RUPIAH') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*9000);

if (combobox1.Text='RUPIAH') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x/6619);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*6619);

if (combobox1.Text='RUPIAH') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/13650);
if (combobox1.Text='EURO') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*13650);

if (combobox1.Text='RUPIAH') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/17076);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*17076);

if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x/0.6994);
 if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x*0.6994);

if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/1.4422);
if (combobox1.Text='EURO') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x*1.4422);

if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/1.8041);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x*1.8041);

if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/2.0618);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='EURO') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x*2.0618);

if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/2.5792);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x*2.5792);

if (combobox1.Text='EURO') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/1.251);
if (combobox1.Text='EURO') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x*1.251);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/1);


end;

procedure TForm1.Button2Click(Sender: TObject);
begin
application.Terminate;
end;

end.

.........PHYTAGORAS........

procedure TForm1.Button3Click(Sender: TObject);
var n,i,j,k,a,b,c:integer;
begin
  n:=StrToInt(Edit1.Text);
  For i:=1 to n do
  begin
  For j:=1 to i do
    begin
    for k:=1 to j do
      begin
      a:=i*i;
      b:=j*j+k*k;
      if a=b
      then
        begin
        c:=c+1;
        Listbox1.Items.Add('Bilangan Phytagoras-'+IntToStr(c)+':'+IntToStr(k)+','+IntToStr(j)+','+IntToStr(i));
  end;
  end;
  end;
  end;

end;



end.

0 comments: