Показать сообщение отдельно
  #4  
Старый 29.05.2011, 22:43
Аватар для PhoeniX
PhoeniX PhoeniX вне форума
Always hardcore!
 
Регистрация: 04.03.2009
Адрес: СПб
Сообщения: 3,239
Версия Delphi: GCC/FPC/FASM
Репутация: 62149
По умолчанию

О боже... Не множьте сущности, мол.чек.

Код:
procedure TForm1.Button1Click(Sender: TObject);
var
  j,i,min,max:integer;
begin
  min:=StrToInt(StringGrid1.Cells[j,i]);
  min:=max;
  For i:=1 to StringGrid1.RowCount-1 do
    For j:=1 to StringGrid1.ColCount-1 do begin
      if StrToInt(StringGrid1.Cells[j,i])<min then
        min:=StrToInt(StringGrid1.Cells[j,i]);
      if StrToInt(StringGrid1.Cells[j,i])>max then
        max:=StrToInt(StringGrid1.Cells[j,i]);
    end;
  Label4.Caption:=IntToStr(min);
  Label3.Caption:=IntToStr(max);
end;
__________________
Оставайтесь хорошими людьми...
VK id2634397, ds [at] phoenix [dot] dj
Ответить с цитированием