(*//******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby,
C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/*)
program SLAU;
uses crt;
type
aa=array[1..4,1..4] of real;
bb=array[1..4] of real;
var
slaum:text;
a:aa;
b ,x, x1, x0 :bb;
i,j,k,m,n:integer;
procedure gaussa(a1:aa;b1:bb;var x1:bb;n1:integer);
var
i1,j1,k1:integer;
q1,s1: real;
Begin
//eps1:=0.0001;
for i1:=1 to n1-1 do
for k1:=i1+1 to n1 do
Begin
q1:=a1[k,i]/a1[i,i];
for j1:=1 to n1 do
a1[k1,j1]:=a1[k1,j1]-q1*a1[i1,j1];
b1[k1]:=b1[k1]-b1[i1]*q1;
end;
Writeln;
x1[n1]:=b1[n1]/a1[n1,n1];
for i1:=n1-1 downto 1 do
Begin
s1:=0;
for j1:=i1+1 to n1 do
s1:=s1+a1[i1,j1]*x1[j1];
x1[i1]:=(b1[i1]-s1)/a1[i1,i1];
end;
End;
Begin
end.