Лабораторная работа: Создание и обработка линейного массива
Button1: TButton; Button2: TButton;
GroupBox1: TGroupBox; CheckBox1: TCheckBox; CheckBox2: TCheckBox;
Edit1: TEdit; Edit2: TEdit;
procedure Button1Click (Sender: TObject);
procedure Button2Click (Sender: TObject);
private {Private declarations}
public {Public declarations}
end;
var Form1: TForm1; i, j: integer;
implementation {$R *.dfm}
procedure TForm1. Button1Click (Sender: TObject);
begin Randomize;
with StringGrid1 do begin i:=0;
for j:=1 to RowCount‑1 do Cells [i, j]:=IntToStr(j);
j:=0;
for i:=1 to ColCount‑1 do Cells [i, j]:=IntToStr(i); end;
with StringGrid1 do
for i:=1 to ColCount‑1 do
for j:=1 to RowCount‑1 do
begin
Cells [i, j]:=IntToStr (Round(Sin (Random(100))*100));
end; end;
procedure TForm1. Button2Click (Sender: TObject);
var min, max:integer;
begin
if CheckBox1. Checked then
with StringGrid1 do begin
min:=StrToInt (Cells[1,1]);
for i:=1 to ColCount‑1 do