answersLogoWhite

0

/*PROGRAM TO IMPLEMENT GAUSS-jordan method.

#include
#define MX 20
main()
{
float a[MX] [MX+1],m,p;
int i,j,k,n;
puts("\n how many equations?:");
scanf("%d",&n);
for(i=0;i<=n-1;i++)
{
printf("Give the coefficients of the equation no%d:\n",i+1);
for(j=0;j<=n;j++)
scanf("%f",&a[i][j]);
}
for(k=0;k<=n-1;k++)
{
for(i=0;i<=n-1;i++)
{
m=a[i][k]/a[k][k];
p=a[k][k];
for(j=k;j<=n;j++)
{
if(i==k)
a[i][j]=a[i][j]/p;
else
a[i][j]=a[i][j]-m*a[k][j];
}
}
}
for(i=0;i<=n-1;i++)
printf("\n X[%2d]=%5.2f",i,a[i][n]);

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Trending Questions
What is bus memory transfer? What happens to the current flowing in the ring main as more bulbs are turned on at night? What is the ideal degree of slope of a vehicle ramp? How much sand is in a cubic meter of concrete? The voltage in a lightbulb is given by the equation V IR. In this equation V is the voltage I is the current and R is the resistance. What is the current in a lightbulb with a voltage of 10.0 V and a? Why would the power drive light be on in my 1998 Honda Passport? Why is your carburetor back firing on your 1978 American clipper rv? What is the definition of a fixed end beam? Png stands for? What has to be broken befor you use it? When you wish to position text or an object horizontally between the left and right margins on the Page use the left align button? C plus plus programs - to replace every space in a string with a hyphen? Swapping of two numbers using function overloading in c plus plus? What is the yield strength of aluminium die casting? When a 1 ohm resistor and a 1 ohm resistor are connected in series what is their conbined resistance? An absorber separated two chemicals. How do you make one chemical go through one specific pipeline and another chemical go through another one to get to their intended destinations after separation? Which is 1st the animal to be cloned and where? What are Techniques for peening a weld? What is the difference between the final prospectuses 424B1 424B2 etc? How to repair gear shift lever on 92 ford aerostar?