
X0 = input('Enter initial guess for X :\n')

R = input ( 'Any initial guess for X? (y/n): ','s') Source Code for Gauss-Seidel Method in C:ĭisp ('Since the modulus of the largest Eigen value of iterative matrix is not less than 1') The iteration process is continued until a desired degree of accuracy is not met.The program assumes initial or approximate solution as y=0 and z=0 and new value of x which is used to calculate new values of y and z using the following expressions:.The number of iterations required depends upon the degree of accuracy. Then, the program asks for allowed error and maximum number of iteration to which the calculations are to be done.When the program is executed, first of all it asks for the value of elements of the augmented matrix row wise.The program for Gauss-Seidel method in C works by following the steps listed below: In this program, a certain approximate value of solution is assumed and further calculations are done based on the result of assumed approximate solution.

This C program for Gauss-Seidel method has been designed for the solution of linear simultaneous algebraic equations based on the principle of iteration. But, the program in high level languages run fast and effectively.

The manual computation iterative method is quite lengthy. Here is source code for Gauss-Seidel in C with working procedure and sample output. On the other hand, in case of iterative methods such as Gauss Jacobi and Gauss-Seidel iteration method, we start with an approximate solution of equation and iterate it till we don’t get the result of desired accuracy. So, direct method of solution takes longer time to get the solution. for the solution of simultaneous algebraic equations yield the solution after a certain amount of fixed computation. The direct methods such as Cramer’s rule, matrix inversion method, Gauss Elimination method, etc.
