I need help on turning this code into a procedure and what changes do i have to make so it works like the gauss-seidel algorithm. I have tried many times on my own but can't seem to get my head around it. Any help would be appriciated greatly.
for k from 1 to maxitr do
print(`Previous iteration value`);
for i from 1 to n do
for j from 1 to n do
if (i<>j) then
summ:=summ + (s[i,j]*X[j]);
print(`new iterative value`);
oh yh if there is any mistake in my code please let me know.