Задача: Фамилия Имя Факультативы Мат. Физ. Инф. Павлов Серг true false true Мисюченко Ира true true false Сидорон Зоя false false true Кладов Роман true false false Создайте массив следующего содержания и структуры, выведите фамилии и имена школьников, которые не посещают факультатив по физике или по математике.
procedure TForm1.Button2Click(Sender: TObject); var i,j:integer; begin for j:=2 to 3 do begin for i:=1 to 4 do if (StringGrid1.Cells[3,j]= 'нет') or (StringGrid1.Cells[4,j]= 'нет') then StringGrid1.Cells[1,j]:= StringGrid1.Cells[1,j]; StringGrid1.Cells[2,j]:= StringGrid1.Cells[2,j]; end;end;
procedure TForm1.Button3Click(Sender: TObject); var i,j:integer; begin for j:=2 to 3 do begin for i:=1 to 4 do StringGrid1.Cells[1,j]:=''; StringGrid1.Cells[2,j]:= ''; StringGrid1.Cells[3,j] := ''; StringGrid1.Cells[4,j] := ''; StringGrid1.Cells[5,j] := '';end; end; end.
Не знаю, как правильно задать Button2, чтобы вывелись только нужные записи.