Minggu, 30 Oktober 2016

Program Delphi Untuk Mencari Bilangan Ganjil dalam Suatu Selang

procedure TBilGanjil.Button1Click(Sender: TObject);
var
a,b : Integer;
Begin
b := StrToInt(Edit2.Text);
for a := StrToInt(Edit1.Text) to b do
  begin
    if a mod 2 <> 0 then Listbox1.items.add(IntToStr(a));
  end;



end;

procedure TBilGanjil.Button2Click(Sender: TObject);
begin
edit1.Text:=' ';
edit2.Text:=' ';
listbox1.Items.Clear;
end;

procedure TBilGanjil.Timer1Timer(Sender: TObject);
begin
label1.Left:=label1.Left-30;
 if  label1.Left<=-200 then
 label1.Left := 550;
end;

procedure TBilGanjil.Button3Click(Sender: TObject);
begin
AplikasiBilanganBulat.Show;
BilGanjil.Hide;
end;

0 komentar:

Posting Komentar