Lines that Trick | Sololearn: Learn to code for FREE!

+2

Lines that Trick

This is practice question from a site, i was trying to solve it... =============== Lines that trick each other Given end points of n lines, design an algorithm and write a C++ code to find all the possible combination of lines which trick each other. A pt on a line is said to be an T_T point if that pt divides the lines in the ratio 2:l starting from the "start point" of the line. For eg. consider the line A with start-pt 5(0,0) and end-pt E(3,3). The pt D(2,2) is the T_T pt for this line. Since the pt D(2,2) divides the line in the ratio 2:1. ie., the length of SD will be equal to twice the length of DE. A line A is said to trick another line B if both the lines A and B have the same TT point. =============== The problem is i made all the required things like the class, its required methods but not getting how to run it appropriately in the driver (or write the main function). Here's my code, if anybody helps me to continue with the code it would a great help... https://code.sololearn.com/ca3a7a44A2A2

6/22/2021 1:56:33 PM

Arun Bhattacharya

1 Answer

New Answer

0

First please write the cout line so that we can see that what thought process you are applying