Помогите!!!! Кто знает С++?Прокомментируйте плиз прогу, завтра сдавать (((
//---------------------------------------------------------------------------
#include
#include
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
int i,j;
int ish[20][20];
int kk=0,
nr=4,
nd=4;
struct rez{
int val;
int down;
int up;
int par;
int sovp;
};
struct rank{
int x;
float k;
};
rez pt[5];
rank rang1[7],rang2[7],rang3[7],rang4[7],rang5[7],b;
int factorial(int n);
float vvv=0,v1,v2,skiz=0,sksc=0,ksush=0;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm1::FormCreate(TObject *Sender)
{
for(i=0;iColCount)-1;i++)
StringGrid1->Cells[0]=i;
for(i=0;iColCount);i++)
{
for(j=1;jRowCount;j++) StringGrid1->Cells[j]="0";
}
StringGrid1->Cells[0][0]="T";
StringGrid1->Cells[(StringGrid1->ColCount)-1][0]="Y";
StringGrid2->Cells[0][0]="K??";
StringGrid3->Cells[0][0]="????";
StringGrid4->Cells[0][0]="????";
for(i=0;iCells[j]=="") k=1;
}
}
if(k==0)
{
for(i=1;iColCount;i++)
{
for(j=1;jRowCount;j++)
{
ish[j]=StrToInt(StringGrid1->Cells[j]);
if(j!=7)
{
if(ish[j]==StrToInt(ComboBox1->Text)) ish[j]=StrToInt(ComboBox2->Text);
if(ish[j]==StrToInt(ComboBox3->Text)) ish[j]=StrToInt(ComboBox4->Text);
}
Label1->Caption="";
}
//kk=1;
}
}
else Label1->Caption="????";
//----------------------------------------------------
//for(j=1;jCells[0][j]=IntToStr(ish[7][j]);
for(i=1;iRowCount;i++) pt.val=0;
for(j=1;jRowCount;j++)
{
pt[(ish[j][7])].val++;
if(j==1) pt[ish[j][7]].down=j;
if(ish[j][7]!=ish[j-1][7])
{
pt[ish[j][7]].down=j;
pt[ish[j-1][7]].up=j-1;
}
//if(j+==(StringGrid1->RowCount)) pt[ish[j][7]].up=j;
}
//float *ksc = new float[StringGrid1->RowCount];
float ksc;
//-------------------------------------------------------------
int ii,jj;
for(ii=1;iiColCount-1;ii++)
{
for(i=1;i