Minggu, 30 Oktober 2016

Program Delphi Daily Problem "UTANG PIUTANG"

procedure TUang.Button1Click(Sender: TObject);
var
  w,i:integer;
  b,p:real;
begin
  p:=strtofloat(edit1.Text);
  b:=strtofloat(edit2.text);
  w:=strtoint(edit3.Text);
  for i:= 1 to w do
  begin
  p:=p+(p*(b/100));
  listbox1.Items.add('Bulan ke-' + inttostr(i) +'=' + floattostr(p));
  end;

end;

procedure TUang.Button2Click(Sender: TObject);
begin
edit1.text:=' ';
edit2.text:=' ';
edit3.text:=' ';
listbox1.items.Clear;
end;

procedure TUang.Timer1Timer(Sender: TObject);
begin
label1.Left:=label1.Left-30;
 if  label1.Left<=-300 then
 label1.Left := 750;
end;

procedure TUang.Button3Click(Sender: TObject);
begin
DailyProblems.Show;
Uang.Hide;
end;

end.

0 komentar:

Posting Komentar