Write a C program that uses Gaussian-Jordan technique to solve simultaneous linear equations. The program should be flexible enough to solve any number of unknowns/linear equations. One should just change row size, column size and the array elements to fit the new dimensions. The rest of the program should work without any changes. What should be submitted : 8C-1: Program to solve 3 linear equations and the output showing the result. 8C-2 : Program to solve 4 linear equations and the output showing the result.
Write a C program that uses Gaussian-Jordan technique to solve simultaneous linear equations. The program should be flexible enough to solve any number of unknowns/linear equations. One should just change row size, column size and the array elements to fit the new dimensions. The rest of the program should work without any changes. What should be submitted : 8C-1: Program to solve 3 linear equations and the output showing the result. 8C-2 : Program to solve 4 linear equations and the output showing the result.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question

Transcribed Image Text:b) Ignore the array's row/ column subscript of 0.
Requirement 8C-2
Next modify the program by changing only the row size, column size and the array elements to solve 4
linear equations with 4 unknowns as shown below.
w + 2x - y +z = 6
-w +x+ 2y - z = 3
2w - x+ 2y + 2z = 14
w + x- y + 2z = 8
Use (hardcode) the following coefficients/matrix within your program to solve above equations. The
expected output is as follows.
Initial matrix
1.000 2.000 -1.000 1.000 | 6.000
-1.000 1.000 2.000 -1.000 | 3.000
2.000 -1.000 2.000 2.000 | 14.000
1.000 1.000 - 1.000 2.000 | 8.000
The solution is:
X1 = 1.000
X2 = 2.000
X3 = 3.000
X4 = 4.000
Note: X1 represents w, X2 represents x, X3 represents y and X4 represents z.

Transcribed Image Text:Write a C program that uses Gaussian-Jordan technique to solve simultaneous linear equations.
The program should be flexible enough to solve any number of unknowns/linear equations. One should
just change row size, column size and the array elements to fit the new dimensions. The rest of the
program should work without any changes.
What should be submitted :
8C-1: Program to solve 3 linear equations and the output showing the result.
8C-2 : Program to solve 4 linear equations and the output showing the result.
Requirement 8C-1
Initial program should be setup to solve 3 linear equations with 3 unknowns as shown below.
2x + 4y + 6z = 22
3x + 8y + 5z = 27
-x + y + 2z = 2
Use (hardcode) the following coefficients/matrix within your program to solve above equations. The
expected output is as follows.
Initial matrix
2.000 4.000 6.000 | 22.000
3.000 8.000 5.000 | 27.000
-1.000 1.000 2.000 | 2.000
The solution is:
X1 = 3.000
X2 = 1.000
X3 = 2.000
Note: X1 represents x, X2 represents y, and X3 represents z.
Using Xn to represent the variables makes easier to print out the answer for the flexibility requested
below.
For convenience, you could declare the array one size greater (row +1, column +1) so that you can
a) Use array subscript / index starting at 1 instead of 0. Makes it easier to match the row / column
counter used in the loop and the row/column subscript used with the array.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 2 images

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY