Function to find distance
static void shortest_distance ( float x1 , float y1 , float a , float b , float c ) { double d = Math . Abs ( ( ( a * x1 + b * y1 + c ) ) / ( Math . Sqrt ( a * a + b * b ) ) ) ; Console . WriteLine ( " Perpendicular ▁ " + " distance ▁ is ▁ " + d ) ; return ; }