Question: Write a C program that solves a system of two simultaneous linear equations in two variables x and y given by: a x + b

Write a C program that solves a system of two simultaneous linear equations in two variables x and y
given by:
ax+by=e
cx+dy=f
The program prompts the user to enter the constant values: a,b,c,d,e and f. It computes the values
of x and y using the formulae:
x=de-bfad-bc
y=af-cead-bc
The program outputs the values of x and y.
For example, if a=3,b=4,c=5,d=6,e=10 and f=16, the solution of the system is:
x=2 and
y=1
Here is the sample run corresponding to the above case:
Enter a,b, e of the first equation: 3410
Enter c,b,f of the second equation: 5616
x=2.000000 and y=1.000000
Write a C program that solves a system of two

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!