Tell me why the program does not work for all input data? How can this be? She thinks one SLAU is true, and in another she does not even give a normal response.
var b,x:array [1..100] of real; a:array [1..100,1..100] of real; i,j,n:integer; E,R,S,d,W:real; Begin writeln('Введите кол-во уравнений :'); readln(n); writeln('Введите точность :'); readln(E); for i:=1 to n do begin writeln ('введите коэффициенты в ',i,' строке'); for j:=1 to n do readln (a[i,j]); end; writeln; writeln ('введите свободные члены'); for i:=1 to n do readln (b[i]); repeat begin R:=0; for i:=1 to n do begin s:=0; for j:=1 to n do if i<>j then S:=S+a[i,j]*x[j]; W:=(b[i]-S)/a[i,i]; d:=abs(Wx[i]); if R<d then begin R:=d; x[i]:=W; end else x[i]:=W; end; end until (R<=E); for i:=1 to n do writeln('x=', x[i]); readln; End. The very SLAE for example:
a11=-1; a12=2; b1=3; a21=3; a22=-5; b2=-4; It should be 7 and 5, and gives-infinity in both cases