Question

use code blocks to write a code that a) solves linear, 2- variable simultaneous equation using...

use code blocks to write a code that

a) solves linear, 2- variable simultaneous equation using the elimination method.

Homework Answers

Answer #1

CODE FOR SOLVING SYSTEM OF LINEAR EQUATION IN TWO VARIABLE BY ELIMINATION METHOD

#include<stdio.h>

int main()

{

int i,j,k,n;

float A[20][20],c,x[10],sum=0.0;

printf("\nEnter the order of matrix: ");

scanf("%d",&n);

printf("\nEnter the elements of augmented matrix row-wise:\n\n");

for(i=1; i<=n; i++)

{

for(j=1; j<=(n+1); j++)

{

printf("A[%d][%d] : ", i,j);

scanf("%f",&A[i][j]);

}

}

for(j=1; j<=n; j++) /* loop for the generation of upper triangular matrix*/

{

for(i=1; i<=n; i++)

{

if(i>j)

{

c=A[i][j]/A[j][j];

for(k=1; k<=n+1; k++)

{

A[i][k]=A[i][k]-c*A[j][k];

}

}

}

}

x[n]=A[n][n+1]/A[n][n];

/* this lo…

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write verilog code for a 8:1 Mux using the blocks of 2:1 Mux; Draw the block...
Write verilog code for a 8:1 Mux using the blocks of 2:1 Mux; Draw the block diagram for this design and write the truth table to prove that the design works as intended. Write verilog code for a 16:1 Mux using the blocks of 4:1 Mux; Draw the block diagram for this design and write the truth table to prove that the design works as intended.
6. For the non-linear differential equation: ??2 2 ??=? −(?+1) +1 (a) Use a computer algebra...
6. For the non-linear differential equation: ??2 2 ??=? −(?+1) +1 (a) Use a computer algebra system (CAS) to generate a slope field for the DE, and attach a printout of the result. (4 pts) (b) Analyze the slope field to determine the linear function ?(?) that solves the IVP when ?(0) = 1.
Write verilog code for a 16:1 Mux using the blocks of 4:1 Mux; Draw the block...
Write verilog code for a 16:1 Mux using the blocks of 4:1 Mux; Draw the block diagram for this design and write the truth table to prove that the design works as intended.
Section B.3 - Algebra - Simultaneous and Quadratic Equations Solve problems 1 and 2 using the...
Section B.3 - Algebra - Simultaneous and Quadratic Equations Solve problems 1 and 2 using the comparison, elimination, or substitution method. 1) x +y =2 2x -3y =5 2 ) 3x - 5y=5 7x + y = 75
Also write the time complexity Solve the non-linear recurrence equation using recurrence A(n) = 2A(n/2) +...
Also write the time complexity Solve the non-linear recurrence equation using recurrence A(n) = 2A(n/2) + n Solve the non-linear recurrence equation using Master’s theorem T (n) = 16T (n/4) + n
Using C++ code, write a program named q5.cpp to solve the equation 2n = 14.27 for...
Using C++ code, write a program named q5.cpp to solve the equation 2n = 14.27 for n.
Linear Regression Use linear regression to find the equation for the linear function that best fits...
Linear Regression Use linear regression to find the equation for the linear function that best fits this data. Round both numbers to two decimal places. Write your final answer in a form of an equation y=mx+by=mx+b x 1 2 3 4 5 6 y 98 122 156 176 213 219
Use linear regression to find the equation for the linear function that best fits this data....
Use linear regression to find the equation for the linear function that best fits this data. Round both numbers to two decimal places. Write your final answer in a form of an equation y=mx+by=mx+b x 1 2 3 4 5 6 y 93 110 138 170 191 212   
Use linear regression to find the equation for the linear function that best fits this data....
Use linear regression to find the equation for the linear function that best fits this data. Round both numbers to two decimal places. Write your final answer in a form of an equation y = m x + b x 1 2 3 4 5 6 y 87 102 119 149 158 178
The following situation can be modeled by a linear function. Write an equation for the linear...
The following situation can be modeled by a linear function. Write an equation for the linear function and use it to answer the given question. The price of a particular model car is $22,000 today and rises with time at a constant rate of $820 per year. How much will a new car cost in 3.4 years? Use an equation to model this situation where p is the price of a car in dollars and t is the time in...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT