Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls;
- type
- TForm1 = class(TForm)
- Edit1: TEdit;
- Button1: TButton;
- ListBox1: TListBox;
- Button2: TButton;
- Button3: TButton;
- procedure Button3Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- procedure Button1Click(Sender: TObject);
- procedure hviezdy;
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- procedure TForm1.Button2Click(Sender: TObject);
- begin
- Edit1.Text:='';
- Listbox1.Items.Clear;
- end;
- procedure TForm1.Button3Click(Sender: TObject);
- var
- i:integer;
- begin
- randomize;
- for i := 1 to 10 do
- begin
- Listbox1.Items.Add(IntToStr(random(100)+1));
- end;
- end;
- procedure TForm1.hviezdy;
- var
- i:integer;
- riadok:string;
- begin
- riadok:='';
- for i := 1 to StrToInt(Edit1.Text) do
- begin
- riadok:=riadok+'*';
- Listbox1.Items.Add(riadok);
- end;
- end;
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- hviezdy;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement