text: Program to find the Eccentricity of a Hyperbola | C # program for the above approach ; Function to find the eccentricity of a hyperbola ; Stores the squared ratio of major axis to minor axis ; Increment r by 1 ; Return the square root of r ; Driver Code
code: using System ; class GFG { static double eccHyperbola ( double A , double B ) { double r = ( double ) B * B / A * A ; r += 1 ; return Math . Sqrt ( r ) ; } public static void Main ( String [ ] args ) { double A = 3.0 , B = 2.0 ; Console . Write ( eccHyperbola ( A , B ) ) ; } }