Program1.pas(20) : Параметр цикла for в PascalABC.NET должен описываться в заголовке цикла program cn11;
type mat=array[1..3,1..3] of integer;
vec=array[1..3] of integer;
vs=array[1..3] of real;
var a : mat;
b : vec;
sol : vs;
p,n : integer;
de : real;
function cdet( x:mat;t:integer):real;
var i,j,k,l: integer;
s : real;
minor : mat;
begin
if t=1 then cdet:=x[1,1]
else
begin s:=0;
for k:=1 to t do
begin
for i:=1 to t-1 do
for j:=1 to k-1 do minor[i,j]:=x[i+1,j];
for i:=1 to t-1 do
for j:=k to t-1 do minor[i,j]:=x[i+1,j+1];
if odd(k) then s:=s+x[1,k]*cdet(minor, t-1)
else s:=s-x[1,k]*cdet(minor, t-1);
end;
cdet:=s;
end;
end;
function transforma(x:mat;t,l:integer):real;
var i : integer;
begin for i:=1 to t do x[i,l]:=b[i];
transforma:=cdet(x,t);
end;
begin
n:=3;
a[1,1]:= 0; a[1,2]:= -2; a[1,3]:= -8; a[1,4]:= 3;a[1,5]:= -4; a[1,6]:= -2;a[1,7]:=2; b[1]:= -104;
a[2,1]:=5; a[2,2]:= 8; a[2,3]:= 0;a[2,4]:= -5;a[2,5]:= 2;a[2,6]:= 0;a[2,7]:= -8; b[2]:= 94;
a[3,1]:= 2; a[3,2]:=-4; a[3,3]:= 7;a[3,4]:= 3;a[3,5]:= 7;a[3,6]:= 10;a[3,7]:= 9; b[3]:=159;
a[4,1]:= -4; a[4,2]:=2; a[4,3]:= 0;a[4,4]:= 3;a[4,5]:= 6;a[4,6]:= -8; b[4]:=-80;
a[5,1]:= 0; a[5,2]:=0; a[5,3]:= 8;a[5,4]:= 7;a[5,5]:= 2;a[5,6]:= -6;a[5,7]:= 2; b[5]:=204;
a[6,1]:= 7; a[6,2]:=0; a[6,3]:= 9;a[6,4]:= -9;a[6,5]:= 6;a[6,6]:= -6; b[6]:=209;
a[7,1]:= -5; a[7,2]:=9; a[7,3]:= -6;a[7,4]:= -5;a[7,5]:= 10;a[7,6]:= 0;a[7,7]:= -9; b[7]:=-29;
de:=cdet(a,n);
if de<>0 then
begin for p:=1 to n do sol[p]:= transforma(a,n,p)/de;
for p:=1 to n do writeln('x[',p,']=',sol[p]:0:3);
end
else writeln('Calcul imposibil');
end.