Додаток 2.

unit Ugener;

..........................

procedure TFgener.FormActivate(Sender: TObject);

begin

tabl.Cells[0,0]:='Номер';

 tabl.Cells[1,0]:='Генер_число';

 tabl.Cells[2,0]:='Середнє';

 tabl.Cells[3,0]:='Похибка';

 tabl.Cells[4,0]:='Квадрат похибок';

 tabl.Cells[5,0]:='Істинні похибки';

 tabl.Cells[6,0]:='Істинні квадрати';

 tabl.Cells[0,1]:='1';

 tabl.Cells[0,2]:='2';

 tabl.Cells[0,3]:='3';

 tabl.Cells[0,4]:='4';

 tabl.Cells[0,5]:='5';

 tabl.Cells[0,6]:='6';

 tabl.Cells[0,7]:='7';

 tabl.Cells[0,8]:='8';

 tabl.Cells[0,9]:='9';

 tabl.Cells[0,10]:='10';

 tabl.Cells[0,11]:='11';

 tabl.Cells[0,12]:='12';

 tabl.Cells[0,13]:='13';

 tabl.Cells[0,14]:='14';

 tabl.Cells[0,15]:='15';

 tabl.Cells[0,16]:='16';

 tabl.Cells[0,17]:='17';

 tabl.Cells[0,18]:='18';

 tabl.Cells[0,19]:='19';

 tabl.Cells[0,20]:='20';

 tabl.Cells[0,21]:='21';

 tabl.Cells[0,22]:='22';

 tabl.Cells[0,23]:='23';

 tabl.Cells[0,24]:='24';

 tabl.Cells[0,25]:='25';

 tabl.Cells[0,26]:='26';

 tabl.Cells[0,27]:='27';

 tabl.Cells[0,28]:='28';

 tabl.Cells[0,29]:='29';

 tabl.Cells[0,30]:='30';

 tabl.Cells[0,31]:='31';

 tabl.Cells[0,32]:='32';

 tabl.Cells[0,33]:='33';

 tabl.Cells[0,34]:='34';

 tabl.Cells[0,35]:='35';

 tabl.Cells[0,36]:='36';

 tabl.Cells[0,37]:='37';

 tabl.Cells[0,38]:='38';

tabl.Cells[0,11]:='Сума';

end;

procedure TFgener.BitBtn1Click(Sender: TObject);

var

i,j:integer;

a:array[1..38] of real;

begin

randomize ();

for i:=1 to 38 do

a[i]:=strtofloat('0,'+IntToStr(random(38))+IntToStr(random(38)));

  for i:=1 to 38 {stringgrid1.rowCount} do

  tabl.Cells[1,i]:=floattostr(a[i]);

 

end;

 

 

procedure TFgener.BitBtn3Click(Sender: TObject);

var

a:array [1..38] of real;

summ:real;

sr,b,d,v:real;

i,j:integer;

  f,w:TextFile;

  istPohib:string[39];

  generPohib:string[39];

 

begin

 

  for i:=1 to 38 do

  if tabl.Cells[1,i]<>''

  then

  a[i]:=StrToFloat(tabl.Cells[1,i])

  else

  //ShowMessage('Ãåíåðóéòå äàí³');

  Exit;

   for i:=1 to 38 do

   summ:=summ+a[i];

   sr:=summ/38;

   tabl.Cells[1,39]:=FloatToStr(summ);

   tabl.Cells[2,19]:=FloatToStr(sr);

   begin

                generPohib:=tabl.Cells[1,i];

                AssignFile(w,'date\generPohib.txt');

                Rewrite(w);

                 for i:=0 to 39 do

                writeln(w,tabl.Cells[1,i]);

                CloseFile(w);

               end;

 

{ summ:=0;

 for r:=1 to 10 do

  if tabl.Cells[c,r]<>''

  then summ:=summ+StrToFloat(tabl.Cells[c,r])

  else tabl.Cells[c,r]:='0';

  sr:=summ/10; }

     {c[i]:=a[i]-sr;

     tabl.Cells[3,i]:=FloatToStr(c[i]);

       i:=i+1;     }

  tabl.Cells[3,1]:=floattostr((strtofloat(tabl.Cells[1,1]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,2]:=floattostr((strtofloat(tabl.Cells[1,2]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,3]:=floattostr((strtofloat(tabl.Cells[1,3]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,4]:=floattostr((strtofloat(tabl.Cells[1,4]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,5]:=floattostr((strtofloat(tabl.Cells[1,5]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,6]:=floattostr((strtofloat(tabl.Cells[1,6]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,7]:=floattostr((strtofloat(tabl.Cells[1,7]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,8]:=floattostr((strtofloat(tabl.Cells[1,8]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,9]:=floattostr((strtofloat(tabl.Cells[1,9]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,10]:=floattostr((strtofloat(tabl.Cells[1,10]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,11]:=floattostr((strtofloat(tabl.Cells[1,11]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,12]:=floattostr((strtofloat(tabl.Cells[1,12]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,13]:=floattostr((strtofloat(tabl.Cells[1,13]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,14]:=floattostr((strtofloat(tabl.Cells[1,14]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,15]:=floattostr((strtofloat(tabl.Cells[1,15]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,16]:=floattostr((strtofloat(tabl.Cells[1,16]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,17]:=floattostr((strtofloat(tabl.Cells[1,17]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,18]:=floattostr((strtofloat(tabl.Cells[1,18]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,19]:=floattostr((strtofloat(tabl.Cells[1,19]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,20]:=floattostr((strtofloat(tabl.Cells[1,20]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,21]:=floattostr((strtofloat(tabl.Cells[1,21]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,22]:=floattostr((strtofloat(tabl.Cells[1,22]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,23]:=floattostr((strtofloat(tabl.Cells[1,23]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,24]:=floattostr((strtofloat(tabl.Cells[1,24]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,25]:=floattostr((strtofloat(tabl.Cells[1,25]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,26]:=floattostr((strtofloat(tabl.Cells[1,26]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,27]:=floattostr((strtofloat(tabl.Cells[1,27]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,28]:=floattostr((strtofloat(tabl.Cells[1,28]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,29]:=floattostr((strtofloat(tabl.Cells[1,29]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,30]:=floattostr((strtofloat(tabl.Cells[1,30]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,31]:=floattostr((strtofloat(tabl.Cells[1,31]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,32]:=floattostr((strtofloat(tabl.Cells[1,32]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,33]:=floattostr((strtofloat(tabl.Cells[1,33]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,34]:=floattostr((strtofloat(tabl.Cells[1,34]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,35]:=floattostr((strtofloat(tabl.Cells[1,35]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,36]:=floattostr((strtofloat(tabl.Cells[1,36]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,37]:=floattostr((strtofloat(tabl.Cells[1,37]))-sr);//,ffGeneral,6,5);

  tabl.Cells[3,38]:=floattostr((strtofloat(tabl.Cells[1,38]))-sr);//,ffGeneral,6,5);

  { for i:=1 to tabl.RowCount do

  for j:=1 to 2 do

  b:=StrToFloat(tabl.Cells[1,i])-StrToFloat(tabl.Cells[2,i]);

       tabl.Cells[3,i]:=FloatToStr(b); }

       for i:=1 to 38 do

 if tabl.Cells[3,i]<>''

  then

   a[i]:=StrToFloat(tabl.Cells[3,i])

    else a[i]:=0;

     summ:=0;

     for i:=1 to 38 do

       summ:=summ+a[i];

   tabl.Cells[3,39]:=FloatToStrf(summ,ffGeneral,6,5);

   tabl.Cells[4,1]:=floattostr(sqr(strtofloat(tabl.Cells[3,1])));//,ffGeneral,6,5);

  tabl.Cells[4,2]:=floattostr(sqr(strtofloat(tabl.Cells[3,2])));//,ffGeneral,6,5);

  tabl.Cells[4,3]:=floattostr(sqr(strtofloat(tabl.Cells[3,3])));//,ffGeneral,6,5);

  tabl.Cells[4,4]:=floattostr(sqr(strtofloat(tabl.Cells[3,4])));//,ffGeneral,6,5);

  tabl.Cells[4,5]:=floattostr(sqr(strtofloat(tabl.Cells[3,5])));//,ffGeneral,6,5);

  tabl.Cells[4,6]:=floattostr(sqr(strtofloat(tabl.Cells[3,6])));//,ffGeneral,6,5);

  tabl.Cells[4,7]:=floattostr(sqr(strtofloat(tabl.Cells[3,7])));//,ffGeneral,6,5);

  tabl.Cells[4,8]:=floattostr(sqr(strtofloat(tabl.Cells[3,8])));//,ffGeneral,6,5);

  tabl.Cells[4,9]:=floattostr(sqr(strtofloat(tabl.Cells[3,9])));//,ffGeneral,6,5);

  tabl.Cells[4,10]:=floattostr(sqr(strtofloat(tabl.Cells[3,10])));//,ffGeneral,6,5);

  tabl.Cells[4,11]:=floattostr(sqr(strtofloat(tabl.Cells[3,11])));//,ffGeneral,6,5);

  tabl.Cells[4,12]:=floattostr(sqr(strtofloat(tabl.Cells[3,12])));//,ffGeneral,6,5);

  tabl.Cells[4,13]:=floattostr(sqr(strtofloat(tabl.Cells[3,13])));//,ffGeneral,6,5);

  tabl.Cells[4,14]:=floattostr(sqr(strtofloat(tabl.Cells[3,14])));//,ffGeneral,6,5);

  tabl.Cells[4,15]:=floattostr(sqr(strtofloat(tabl.Cells[3,15])));//,ffGeneral,6,5);

  tabl.Cells[4,16]:=floattostr(sqr(strtofloat(tabl.Cells[3,16])));//,ffGeneral,6,5);

  tabl.Cells[4,17]:=floattostr(sqr(strtofloat(tabl.Cells[3,17])));//,ffGeneral,6,5);

  tabl.Cells[4,18]:=floattostr(sqr(strtofloat(tabl.Cells[3,18])));//,ffGeneral,6,5);

  tabl.Cells[4,19]:=floattostr(sqr(strtofloat(tabl.Cells[3,19])));//,ffGeneral,6,5);

  tabl.Cells[4,20]:=floattostr(sqr(strtofloat(tabl.Cells[3,20])));//,ffGeneral,6,5);

  tabl.Cells[4,21]:=floattostr(sqr(strtofloat(tabl.Cells[3,21])));//,ffGeneral,6,5);

  tabl.Cells[4,22]:=floattostr(sqr(strtofloat(tabl.Cells[3,22])));//,ffGeneral,6,5);

  tabl.Cells[4,23]:=floattostr(sqr(strtofloat(tabl.Cells[3,23])));//,ffGeneral,6,5);

  tabl.Cells[4,24]:=floattostr(sqr(strtofloat(tabl.Cells[3,24])));//,ffGeneral,6,5);

  tabl.Cells[4,25]:=floattostr(sqr(strtofloat(tabl.Cells[3,25])));//,ffGeneral,6,5);

  tabl.Cells[4,26]:=floattostr(sqr(strtofloat(tabl.Cells[3,26])));//,ffGeneral,6,5);

  tabl.Cells[4,27]:=floattostr(sqr(strtofloat(tabl.Cells[3,27])));//,ffGeneral,6,5);

  tabl.Cells[4,28]:=floattostr(sqr(strtofloat(tabl.Cells[3,28])));//,ffGeneral,6,5);

  tabl.Cells[4,29]:=floattostr(sqr(strtofloat(tabl.Cells[3,29])));//,ffGeneral,6,5);

  tabl.Cells[4,30]:=floattostr(sqr(strtofloat(tabl.Cells[3,30])));//,ffGeneral,6,5);

  tabl.Cells[4,31]:=floattostr(sqr(strtofloat(tabl.Cells[3,31])));//,ffGeneral,6,5);

  tabl.Cells[4,32]:=floattostr(sqr(strtofloat(tabl.Cells[3,32])));//,ffGeneral,6,5);

  tabl.Cells[4,33]:=floattostr(sqr(strtofloat(tabl.Cells[3,33])));//,ffGeneral,6,5);

  tabl.Cells[4,34]:=floattostr(sqr(strtofloat(tabl.Cells[3,34])));//,ffGeneral,6,5);

  tabl.Cells[4,35]:=floattostr(sqr(strtofloat(tabl.Cells[3,35])));//,ffGeneral,6,5);

  tabl.Cells[4,36]:=floattostr(sqr(strtofloat(tabl.Cells[3,36])));//,ffGeneral,6,5);

  tabl.Cells[4,37]:=floattostr(sqr(strtofloat(tabl.Cells[3,37])));//,ffGeneral,6,5);

  tabl.Cells[4,38]:=floattostr(sqr(strtofloat(tabl.Cells[3,38])));//,ffGeneral,6,5);

 

       for i:=1 to 38 do

  if tabl.Cells[4,i]<>''

   then

   a[i]:=StrToFloat(tabl.Cells[4,i])

    else a[i]:=0;

     summ:=0;

     for i:=1 to 38 do

       summ:=summ+a[i];

   tabl.Cells[4,39]:=FloatToStr(summ);//,ffGeneral,6,5);

 

         b:=sqrt((strtofloat(tabl.Cells[4,39]))/38);

         d:=0.5/b;

            label5.Caption:='='+FloatToStrf(b,ffGeneral,6,5);

            label6.Caption:='='+FloatToStrf(d,ffGeneral,6,5);

 

 

  tabl.Cells[5,1]:=floattostr(d*(strtofloat(tabl.Cells[3,1])));//,ffGeneral,6,5);

  tabl.Cells[5,2]:=floattostr(d*(strtofloat(tabl.Cells[3,2])));//,ffGeneral,6,5);

  tabl.Cells[5,3]:=floattostr(d*(strtofloat(tabl.Cells[3,3])));//,ffGeneral,6,5);

  tabl.Cells[5,4]:=floattostr(d*(strtofloat(tabl.Cells[3,4])));//,ffGeneral,6,5);

  tabl.Cells[5,5]:=floattostr(d*(strtofloat(tabl.Cells[3,5])));//,ffGeneral,6,5);

  tabl.Cells[5,6]:=floattostr(d*(strtofloat(tabl.Cells[3,6])));//,ffGeneral,6,5);

  tabl.Cells[5,7]:=floattostr(d*(strtofloat(tabl.Cells[3,7])));//,ffGeneral,6,5);

  tabl.Cells[5,8]:=floattostr(d*(strtofloat(tabl.Cells[3,8])));//,ffGeneral,6,5);

  tabl.Cells[5,9]:=floattostr(d*(strtofloat(tabl.Cells[3,9])));//,ffGeneral,6,5);

  tabl.Cells[5,10]:=floattostr(d*(strtofloat(tabl.Cells[3,10])));//,ffGeneral,6,5);

  tabl.Cells[5,11]:=floattostr(d*(strtofloat(tabl.Cells[3,11])));//,ffGeneral,6,5);

  tabl.Cells[5,12]:=floattostr(d*(strtofloat(tabl.Cells[3,12])));//,ffGeneral,6,5);

  tabl.Cells[5,13]:=floattostr(d*(strtofloat(tabl.Cells[3,13])));//,ffGeneral,6,5);

  tabl.Cells[5,14]:=floattostr(d*(strtofloat(tabl.Cells[3,14])));//,ffGeneral,6,5);

  tabl.Cells[5,15]:=floattostr(d*(strtofloat(tabl.Cells[3,15])));//,ffGeneral,6,5);

  tabl.Cells[5,16]:=floattostr(d*(strtofloat(tabl.Cells[3,16])));//,ffGeneral,6,5);

  tabl.Cells[5,17]:=floattostr(d*(strtofloat(tabl.Cells[3,17])));//,ffGeneral,6,5);

  tabl.Cells[5,18]:=floattostr(d*(strtofloat(tabl.Cells[3,18])));//,ffGeneral,6,5);

  tabl.Cells[5,19]:=floattostr(d*(strtofloat(tabl.Cells[3,19])));//,ffGeneral,6,5);

  tabl.Cells[5,20]:=floattostr(d*(strtofloat(tabl.Cells[3,20])));//,ffGeneral,6,5);

  tabl.Cells[5,21]:=floattostr(d*(strtofloat(tabl.Cells[3,21])));//,ffGeneral,6,5);

  tabl.Cells[5,22]:=floattostr(d*(strtofloat(tabl.Cells[3,22])));//,ffGeneral,6,5);

  tabl.Cells[5,23]:=floattostr(d*(strtofloat(tabl.Cells[3,23])));//,ffGeneral,6,5);

  tabl.Cells[5,24]:=floattostr(d*(strtofloat(tabl.Cells[3,24])));//,ffGeneral,6,5);

  tabl.Cells[5,25]:=floattostr(d*(strtofloat(tabl.Cells[3,25])));//,ffGeneral,6,5);

  tabl.Cells[5,26]:=floattostr(d*(strtofloat(tabl.Cells[3,26])));//,ffGeneral,6,5);

  tabl.Cells[5,27]:=floattostr(d*(strtofloat(tabl.Cells[3,27])));//,ffGeneral,6,5);

  tabl.Cells[5,28]:=floattostr(d*(strtofloat(tabl.Cells[3,28])));//,ffGeneral,6,5);

  tabl.Cells[5,29]:=floattostr(d*(strtofloat(tabl.Cells[3,29])));//,ffGeneral,6,5);

  tabl.Cells[5,30]:=floattostr(d*(strtofloat(tabl.Cells[3,30])));//,ffGeneral,6,5);

  tabl.Cells[5,31]:=floattostr(d*(strtofloat(tabl.Cells[3,31])));//,ffGeneral,6,5);

  tabl.Cells[5,32]:=floattostr(d*(strtofloat(tabl.Cells[3,32])));//,ffGeneral,6,5);

  tabl.Cells[5,33]:=floattostr(d*(strtofloat(tabl.Cells[3,33])));//,ffGeneral,6,5);

  tabl.Cells[5,34]:=floattostr(d*(strtofloat(tabl.Cells[3,34])));//,ffGeneral,6,5);

  tabl.Cells[5,35]:=floattostr(d*(strtofloat(tabl.Cells[3,35])));//,ffGeneral,6,5);

  tabl.Cells[5,36]:=floattostr(d*(strtofloat(tabl.Cells[3,36])));//,ffGeneral,6,5);

  tabl.Cells[5,37]:=floattostr(d*(strtofloat(tabl.Cells[3,37])));//,ffGeneral,6,5);

  tabl.Cells[5,38]:=floattostr(d*(strtofloat(tabl.Cells[3,38])));//,ffGeneral,6,5);

      for i:=1 to 38 do

   if tabl.Cells[5,i]<>''

    then

    a[i]:=StrToFloat(tabl.Cells[5,i])

     else a[i]:=0;

     summ:=0;

     for i:=1 to 38 do

       summ:=summ+a[i];

   tabl.Cells[5,39]:=FloatToStr(summ);//,ffGeneral,6,5);

 

  tabl.Cells[6,1]:=floattostr(sqr(strtofloat(tabl.Cells[5,1])));//,ffGeneral,6,5);

  tabl.Cells[6,2]:=floattostr(sqr(strtofloat(tabl.Cells[5,2])));//,ffGeneral,6,5);

  tabl.Cells[6,3]:=floattostr(sqr(strtofloat(tabl.Cells[5,3])));//,ffGeneral,6,5);

  tabl.Cells[6,4]:=floattostr(sqr(strtofloat(tabl.Cells[5,4])));//,ffGeneral,6,5);

  tabl.Cells[6,5]:=floattostr(sqr(strtofloat(tabl.Cells[5,5])));//,ffGeneral,6,5);

  tabl.Cells[6,6]:=floattostr(sqr(strtofloat(tabl.Cells[5,6])));//,ffGeneral,6,5);

  tabl.Cells[6,7]:=floattostr(sqr(strtofloat(tabl.Cells[5,7])));//,ffGeneral,6,5);

  tabl.Cells[6,8]:=floattostr(sqr(strtofloat(tabl.Cells[5,8])));//,ffGeneral,6,5);

  tabl.Cells[6,9]:=floattostr(sqr(strtofloat(tabl.Cells[5,9])));//,ffGeneral,6,5);

  tabl.Cells[6,10]:=floattostr(sqr(strtofloat(tabl.Cells[5,10])));//,ffGeneral,6,5);

  tabl.Cells[6,11]:=floattostr(sqr(strtofloat(tabl.Cells[5,11])));//,ffGeneral,6,5);

  tabl.Cells[6,12]:=floattostr(sqr(strtofloat(tabl.Cells[5,12])));//,ffGeneral,6,5);

  tabl.Cells[6,13]:=floattostr(sqr(strtofloat(tabl.Cells[5,13])));//,ffGeneral,6,5);

  tabl.Cells[6,14]:=floattostr(sqr(strtofloat(tabl.Cells[5,14])));//,ffGeneral,6,5);

  tabl.Cells[6,15]:=floattostr(sqr(strtofloat(tabl.Cells[5,15])));//,ffGeneral,6,5);

  tabl.Cells[6,16]:=floattostr(sqr(strtofloat(tabl.Cells[5,16])));//,ffGeneral,6,5);

  tabl.Cells[6,17]:=floattostr(sqr(strtofloat(tabl.Cells[5,17])));//,ffGeneral,6,5);

  tabl.Cells[6,18]:=floattostr(sqr(strtofloat(tabl.Cells[5,18])));//,ffGeneral,6,5);

  tabl.Cells[6,19]:=floattostr(sqr(strtofloat(tabl.Cells[5,19])));//,ffGeneral,6,5);

  tabl.Cells[6,20]:=floattostr(sqr(strtofloat(tabl.Cells[5,20])));//,ffGeneral,6,5);

  tabl.Cells[6,21]:=floattostr(sqr(strtofloat(tabl.Cells[5,21])));//,ffGeneral,6,5);

  tabl.Cells[6,22]:=floattostr(sqr(strtofloat(tabl.Cells[5,22])));//,ffGeneral,6,5);

  tabl.Cells[6,23]:=floattostr(sqr(strtofloat(tabl.Cells[5,23])));//,ffGeneral,6,5);

  tabl.Cells[6,24]:=floattostr(sqr(strtofloat(tabl.Cells[5,24])));//,ffGeneral,6,5);

  tabl.Cells[6,25]:=floattostr(sqr(strtofloat(tabl.Cells[5,25])));//,ffGeneral,6,5);

  tabl.Cells[6,26]:=floattostr(sqr(strtofloat(tabl.Cells[5,26])));//,ffGeneral,6,5);

  tabl.Cells[6,27]:=floattostr(sqr(strtofloat(tabl.Cells[5,27])));//,ffGeneral,6,5);

  tabl.Cells[6,28]:=floattostr(sqr(strtofloat(tabl.Cells[5,28])));//,ffGeneral,6,5);

  tabl.Cells[6,29]:=floattostr(sqr(strtofloat(tabl.Cells[5,29])));//,ffGeneral,6,5);

  tabl.Cells[6,30]:=floattostr(sqr(strtofloat(tabl.Cells[5,30])));//,ffGeneral,6,5);

  tabl.Cells[6,31]:=floattostr(sqr(strtofloat(tabl.Cells[5,31])));//,ffGeneral,6,5);

  tabl.Cells[6,32]:=floattostr(sqr(strtofloat(tabl.Cells[5,32])));//,ffGeneral,6,5);

  tabl.Cells[6,33]:=floattostr(sqr(strtofloat(tabl.Cells[5,33])));//,ffGeneral,6,5);

  tabl.Cells[6,34]:=floattostr(sqr(strtofloat(tabl.Cells[5,34])));//,ffGeneral,6,5);

  tabl.Cells[6,35]:=floattostr(sqr(strtofloat(tabl.Cells[5,35])));//,ffGeneral,6,5);

  tabl.Cells[6,36]:=floattostr(sqr(strtofloat(tabl.Cells[5,36])));//,ffGeneral,6,5);

  tabl.Cells[6,37]:=floattostr(sqr(strtofloat(tabl.Cells[5,37])));//,ffGeneral,6,5);

  tabl.Cells[6,38]:=floattostr(sqr(strtofloat(tabl.Cells[5,38])));//,ffGeneral,6,5);

       for i:=1 to 38 do

   if tabl.Cells[6,i]<>''

    then

    a[i]:=StrToFloat(tabl.Cells[6,i])

      else a[i]:=0;

     summ:=0;

     for i:=1 to 38 do

       summ:=summ+a[i];

   tabl.Cells[6,39]:=FloatToStrf((sqrt(summ/38)),ffGeneral,6,5);

   label8.Caption:='='+(tabl.cells[6,39]);

                begin

                istPohib:=tabl.Cells[5,i];

                AssignFile(f,'date\istPohib.txt');

                Rewrite(f);

                 for i:=0 to 40 do

                writeln(f,tabl.Cells[5,i]);

                CloseFile(f);

                end;

 

  end;

 

 

procedure TFgener.tablKeyPress(Sender: TObject; var Key: Char);

  var

i:integer;

begin

case key of

#8,'0'..'9':;

#13:;

{if tabl.Col<tabl.ColCount-1

  then tabl.Col:=tabl.Col+1;  }

 

  '.',',':

   begin

   if key<>DecimalSeparator then

    key:=DecimalSeparator;

     {if Pos(tabl.],DecimalSeparator<>0

       then key:=Chr(0); }

        end;

        '-':

   if (tabl.Cells[1,i])<>''

    then key:=Chr(0);

     else

      key:=Chr(0);

end;

end;

 

end.