C ++ program to find if line passing through two coordinates also passes through origin or not
#include <bits/stdc++.h> NEW_LINE using namespace std ; bool checkOrigin ( int x1 , int y1 , int x2 , int y2 ) { return ( x1 * ( y2 - y1 ) == y1 * ( x2 - x1 ) ) ; }