วันศุกร์ที่ 5 มิถุนายน พ.ศ. 2558







·         Aplikasi menghitung bunga Delphi
GAMBAR SCREEN


·         LISTING PROGRAM

procedure TForm1.Button1Click(Sender: TObject);
var Waktu,I,B:Integer;Saldo,Bunga:Real;
begin
Saldo := StrToInt(Edit1.Text);
Bunga := StrToInt(Edit2.Text);
Waktu := StrToInt(Edit3.Text);

for I := 1 to Waktu do
  begin
    Saldo := Saldo + (Saldo * (Bunga/100));
    Memo1.Lines.Add('Saldo Bulan '+IntToStr(I)+' = Rp. '+FloatToStr(Saldo));
  end;
end;
end.


·         GAMBAR SCREEN


·         LISTING PROGRAM
procedure TForm1.Button1Click(Sender: TObject);
var
  x,angka: Integer;
begin
angka :=strtoint(edit1.Text);
for x := 1 to angka do
  if x mod 2 = 1 then
  begin
      memo1.Lines.Add('Ganjil = '+inttostr(x));
  end
  else
        memo1.Lines.Add('Genap = '+inttostr(x));
end;
end.


·         GAMBAR SCREEN


·         LISTING PROGRAM
procedure TForm1.Button1Click(Sender: TObject);
var I,B:Integer;Akhir,Saldo,Bunga:Real;
begin
Saldo := StrToInt(Edit1.Text);
Bunga := StrToInt(Edit2.Text);
Akhir := StrToInt(Edit3.Text);
I:=0;
while (Saldo<Akhir) do
  begin
    Inc(I);
    Saldo := Saldo + (Saldo * (Bunga/100));
    Memo1.Lines.Add('Saldo Bulan '+IntToStr(I)+' = Rp. '  +FormatFloat('#,#',Saldo));
  end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
  Edit1.Text:='';Edit2.Text:='';Edit3.Text:='';
  Memo1.Text:='';
end;
end.