Timer is Running

Line passing through 2 points
##### Submissions: 361   Accuracy: 37.93%   Difficulty: Basic   Marks: 1

Given two points P and Q in the coordinate plane, find the equation of the line passing through both the points.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains two points(a,b) and (c,d) in the cartesian plane.

Output:
Print the equation of the line passing through both the points.

Constraints:
1<=T<=10^5
1<=(a.b),(c,d)<=10^5

Example:
Input:

2
3 2
2 6
3 2
5 7

Output:
4x+1y=14
5x-2y=11

#### ** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Ayush Govil
Author: Ayush Govil 1

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.