Minggu, 30 Oktober 2016

Program Delphi Untuk Mencetak Deret "3+9+27+..."

procedure TDeret1.Button9Click(Sender: TObject);
var
i,n,j:integer;
begin
  n:=strtoint(edit9.Text);
  j:=1;
  for i:= 1 to n do
  begin
  j:=j*3;
  listbox3.Items.add(inttostr(j));
  end;

end;

procedure TDeret1.Button10Click(Sender: TObject);
begin
edit9.Text:=' ';
listbox3.Items.Clear;
end;

procedure TDeret1.Button11Click(Sender: TObject);
begin
Deret.Show;
Deret1.Hide;
end;

procedure TDeret1.Panel3Click(Sender: TObject);
begin
edit9.Text:=' ';
listbox3.Items.Clear;

end;

procedure TDeret1.Panel4Click(Sender: TObject);
begin
Deret.Show;
Deret1.Hide;

end;

0 komentar:

Posting Komentar