Check if given two straight lines are identical or not | C ++ program to check if given two straight lines are identical or not ; Function to check if they are identical ; Driver Code
#include <bits/stdc++.h> NEW_LINE using namespace std ; void idstrt ( double a1 , double b1 , double c1 , double a2 , double b2 , double c2 ) { if ( ( a1 / a2 == b1 / b2 ) && ( a1 / a2 == c1 / c2 ) && ( b1 / b2 == c1 / c2 ) ) cout << " The ▁ given ▁ straight " << " ▁ lines ▁ are ▁ identical " << endl ; else cout << " The ▁ given ▁ straight " << " ▁ lines ▁ are ▁ not ▁ identical " << endl ; } int main ( ) { double a1 = -2 , b1 = 4 , c1 = 3 , a2 = -6 , b2 = 12 , c2 = 9 ; idstrt ( a1 , b1 , c1 , a2 , b2 , c2 ) ; return 0 ; }