00:01
Hello, for problem 25, you want to use kramer's rule to test if two lines are parallel, or if they intersect, and if they intersect, you want to print the point of intersection.
00:24
So we'll start by receiving inputs from the user, and we're going to receive four points, so points x1, y, 1, and x2, y 2, y 2 that are on line 1, and then x3, y 3, and x4, y 4, that are on line 2.
00:47
And we need to then solve the two linear equations.
00:52
And so i've used a, b, c, d, and f, a, b, c, d, and f, sorry, to define those lines.
01:07
So a is the coefficient of x for line one, b is the coefficient for y for line two, c, sorry, e is the constant in that equation, and then c, d, and f.
01:24
Are for line 2.
01:26
So you can see how they're defined here.
01:30
And then we need to first check if a solution exists.
01:33
If a times d minus b times c is equal to zero, then the two lines are parallel and no solution exists...