Kamis, 24 Maret 2011

scripe pascal

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Button1: TButton;
    Button2: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

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

procedure TForm1.Button2Click(Sender: TObject);
var angka:string;
begin
angka:= edit1.text;
if (length(angka)>3) and (length(angka)<7) then
insert('.',angka,length(angka)-2) else
 if (length(angka)>6) and (length(angka)<10) then
 begin
insert('.',angka,length(angka)-2);
insert('.',angka,length(angka)-6);
end else
 if (length(angka)>9) and (length(angka)<13) then
 begin
insert('.',angka,length(angka)-2);
insert('.',angka,length(angka)-6);
insert('.',angka,length(angka)-10);
end;
edit2.text:=angka;

end;

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

end.
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

{
=
}
type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Memo1: TMemo;
    Button1: TButton;
    Label1: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

//Konversi Nilai Mata Uang ke dalam bahasa Indonesia
Function Terbilang(Uang:Int64):String;
Begin
      If (Uang = 1) Then Terbilang:='Satu '
      Else If (Uang = 2) Then Terbilang:='Dua '
      Else If (Uang = 3) Then Terbilang:='Tiga '
      Else If (Uang = 4) Then Terbilang:='Empat '
      Else If (Uang = 5) Then Terbilang:='Lima '
      Else If (Uang = 6) Then Terbilang:='Enam '
      Else If (Uang = 7) Then Terbilang:='Tujuh '
      Else If (Uang = 8) Then Terbilang:='Delapan '
      Else If (Uang = 9) Then Terbilang:='Sembilan '
      Else If (Uang = 0) Then Terbilang := ' '
      Else If (Uang = 10) Then Terbilang := 'Sepuluh '
      Else If (Uang = 11) Then Terbilang := 'Sebelas '
      Else If (Uang >= 12) And (Uang <= 19) Then Terbilang:=Terbilang(Uang Mod 10) + 'Belas '
Else If (Uang >=20) And (Uang <=99) Then Terbilang := Terbilang(Uang div 10) + 'Puluh ' + Terbilang(Uang Mod 10)
Else If (Uang >=100) And (Uang <=199) Then Terbilang := 'Seratus ' + Terbilang(Uang - 100)
Else If (Uang >= 200) And (Uang <=999) Then Terbilang := Terbilang(Uang div 100) + 'Ratus ' + Terbilang(Uang Mod 100)
Else If (Uang >=1000) And (Uang <=1999) Then Terbilang := 'Seribu ' + Terbilang(Uang - 1000)
Else If (Uang >=2000) And (Uang <=999999) Then Terbilang := Terbilang(Uang div 1000) + 'Ribu ' + Terbilang(Uang Mod 1000)
Else If (Uang >=1000000) And (Uang <=999999999) Then Terbilang := Terbilang(Uang div 1000000) + 'Juta ' + Terbilang(Uang Mod 1000000)
Else If (Uang >=1000000000) And (Uang <=999999999999) Then Terbilang :=Terbilang(Uang div 1000000000) + 'Milyar ' + Terbilang(Uang Mod 1000000000)
Else If (Uang >=1000000000000)  Then Terbilang :=Terbilang(Uang div 1000000000000) + 'Triliun ' + Terbilang(Uang Mod 1000000000000);
End;

procedure TForm1.Button1Click(Sender: TObject);
begin
 Memo1.Text := Terbilang(StrToInt64(Edit1.Text));
end;

end.

2 komentar:

Did you hear there's a 12 word sentence you can communicate to your man... that will induce intense feelings of love and impulsive attraction for you buried within his heart?

Because hidden in these 12 words is a "secret signal" that fuels a man's instinct to love, adore and guard you with all his heart...

12 Words Who Fuel A Man's Desire Impulse

This instinct is so built-in to a man's mind that it will drive him to work harder than ever before to take care of you.

Matter of fact, fueling this all-powerful instinct is so binding to having the best ever relationship with your man that once you send your man one of these "Secret Signals"...

...You will immediately find him open his heart and soul to you in a way he never experienced before and he'll distinguish you as the one and only woman in the world who has ever truly understood him.

Did you hear there is a 12 word sentence you can say to your man... that will induce intense emotions of love and instinctual appeal to you buried inside his chest?

Because deep inside these 12 words is a "secret signal" that triggers a man's instinct to love, adore and look after you with his entire heart...

12 Words That Trigger A Man's Desire Instinct

This instinct is so built-in to a man's brain that it will make him work harder than before to to be the best lover he can be.

Matter-of-fact, triggering this powerful instinct is absolutely mandatory to having the best possible relationship with your man that the instance you send your man one of the "Secret Signals"...

...You'll immediately find him open his mind and heart to you in such a way he haven't experienced before and he will see you as the only woman in the galaxy who has ever truly interested him.

Posting Komentar

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites