void __fastcall TForm1::Button1Click(TObject *Sender) { int c = 0; for (int i=0; iCells[i][j] > StringGrid1->Cells[i][j+1] && StringGrid1->Cells[i][j] < StringGrid1->Cells[i][j-1]) c++; } } if ( c==0) Label3->Caption="��� ����������"; else Label3->Caption="����� ��������� � ������� ����� ��������� ������� ������ ���, � ������ � ������ ="+ FloatToStr(c); }