can anyone provide some help with it . i am totally unable to do this one.i tried to do some coding but it didn't work at all. Anyways i have included the code.It is incomplete and wrong anyways.
#include<stdio.h>
#include<math.h>
main()
{
int rows, columns, iter, i,j,k;
printf("enter the number of rows and columns:");
scanf("%d, %d",&rows, &columns);
double a[rows][columns], b[rows][1],x[rows][1];
printf("enter the elements of A matrix:");
for(i=0;i<rows;i++)
{
for(j=0;j<columns;j++)
scanf("%lf",&a[i][j]);
}
printf("\n enter the elements of B matrix:");
for(i=0,i<rows;i++)
scanf("%lf",&b[i][0]);
printf("\n");
for (iter=1; iter<rows; iter++)
{
for(i=iter;i<rows;i++)
b[i][0] = b[i][0]- a[k][iter-1]*(b[i-1][0]/a[iter-1][iter-1]);
for(j=iter-1,k=iter;j<columns;j++)
a[i][j] = a[i][j]-a[i-1][j]*(a[k][iter-1]/a[iter-1][iter-1]);
}
printf("the elements of the matrix A are now:");
for(i=0;i<rows; i++)
{
for(j=0; j<columns; j++)
printf("%lf",a[i][j]);
}
return(0);
}
After this back substitution has to be done . The equation is [a][x] = [b] and we have to find the values of x for given [a] and [b] matrices.