Length of the normal from origin on a straight line whose intercepts are given | C # implementation of the approach ; Function to find the normal of the straight line ; Length of the normal ; Driver code
using System ; class GFG { static float normal ( float m , float n ) { float N = ( float ) ( ( Math . Abs ( m ) * Math . Abs ( n ) ) / Math . Sqrt ( ( Math . Abs ( m ) * Math . Abs ( m ) ) + ( Math . Abs ( n ) * Math . Abs ( n ) ) ) ) ; return N ; } public static void Main ( ) { float m = - 5 , n = 3 ; Console . Write ( normal ( m , n ) ) ; } }