by JAVA or C or C++



A number (N) of lines (extending to infinity) in both directions are drawn on a plane. The lines are specified by the angle (positive or negative) made with the x axis (in degrees). It may be assumed that the different lines are not coincident (they do not overlap each other). The objective is to determine the number of parallelograms in the plane formed by these lines.

for ex:If the lines are given with an angle of 10, 70, 30 and 30.


Please add a proper description of question. And if it is taken from somewhere then add links to it. It helps. Anyways in this case -


Please use a proper title.