Question: jacobi algorithm??Need Help

Hi i'm trying to code the jacobi method but my code dosen't work. Nothing happens. What hav i done wrong

restart:

n:=3:
N:=0.01:

s:=MATRIX([[1,2,3],[2,3,1],[3,1,2]]):
for i from 1 to n do
  X_0:=0
end do:

iter:=1:

while (iter <= N ) do
   sum:=0:

   for i from 1 to n do
     for j from 1 to n do

      if i<>j then

       sum:=sum + (s(i,j)* X_0);
     end do:
   end do:

      X[i]:=(b[i]-sum)/s(i,i);
  end do:
iter:=iter + 1;

 for i from 1 to n
    X_0:=X[i]
  end if:
end if;

y:=X_0;

Please Wait...