text: Length of diagonals of a Rhombus using length of Side and vertex Angle | C # program to implement the above approach ; Function to calculate the length of diagonals of a rhombus using length of sides and vertex angle ; Driver Code
code: using System ; class GFG { static double [ ] Length_Diagonals ( int a , double theta ) { double p = a * Math . Sqrt ( 2 + ( 2 * Math . Cos ( theta * ( Math . PI / 180 ) ) ) ) ; double q = a * Math . Sqrt ( 2 - ( 2 * Math . Cos ( theta * ( Math . PI / 180 ) ) ) ) ; return new double [ ] { p , q } ; } public static void Main ( String [ ] args ) { int A = 6 ; double theta = 45 ; double [ ] ans = Length_Diagonals ( A , theta ) ; Console . Write ( " { 0 : F2 } " + " ▁ " + " { 1 : F2 } " , ans [ 0 ] , ans [ 1 ] ) ; } }