trying to figure out how i would start this problem
Given the equations shown below, the values of x and y can be found using Cramer's Rule.
ax + by = c
dx + ey = f
Cramer's Rule says that determinants can be used to calculate the values of x and y as follows:
Cramer x formula Cramer y formula
To calculate the determinant of a 2 x 2 matrix, cross multiply and subtract the products. For example, the determinant of
sample matrix
is (5 * 6 - 3 * 4) = 18
Write an interactive C++ program that uses Cramer's Rule to solve a pair of linear equations. The program should prompt for 6 integer values that represent the 6 unknowns, a-f.
As output,
* display your name, section #, and the assignment # AFTER the prompts for input
* display the 2 equations and the values of x and y with appropriate labels (see sample terminal session below)
Requirements
* program must read a, b, c, d, e, and f in that order (separate prompts are not necessary)
* a, b, c, d, e, and f must be declared as integers and displayed as integers
* x and y should be declared as double type values (may include decimals)
* your name, section #, and assignment # must be displayed after the input values have been read and before the equations are output
* when displaying the equations, make sure there is exactly 1 blank space between the terms and operators (see sample terminal session)
* the equations and x and y values should be displayed on separate lines
* let the computer use its default settings for displaying x and y (do not set precision)
NOTE: You may assume that the determinant of the denominator will NOT be equal to zero.
Sample terminal session and output:
[lee@bobby]$ g++ hw03.cpp
[lee@bobby]$ ./a.out
Please enter integer value for a
4
Please enter integer value for b
6
Please enter integer value for c
4
Please enter integer value for d
2
Please enter integer value for e
-9
Please enter integer value for f
-2
Lee Misch Section #100_ Assignment #3
4x + 6y = 4
2x + -9y = -2
x = 0.5
y = 0.333333