Program to calculate area of a parallelogram | C # program for the above approach ; Function to return the area of parallelogram using sides and angle at the intersection of diagonal ; Calculate area of parallelogram ; Return the answer ; Function to return the area of parallelogram using sides and angle at the intersection of sides ; Calculate area of parallelogram ; Return the answer ; Function to return the area of parallelogram using diagonals and angle at the intersection of diagonals ; Calculate area of parallelogram ; Return the answer ; Driver code ; Given diagonal and angle ; Function call ; Print the area
using System ; class GFG { static double Area_Parallelogram1 ( int a , int b , int theta ) { double area = ( Math . Abs ( Math . Tan ( ( theta * Math . PI ) / 180 ) ) / 2 ) * Math . Abs ( a * a - b * b ) ; return area ; } static double Area_Parallelogram2 ( int a , int b , int gamma ) { double area = ( Math . Abs ( Math . Sin ( ( gamma * Math . PI ) / 180 ) ) ) * Math . Abs ( a * b ) ; return area ; } static double Area_Parallelogram3 ( int d1 , int d2 , int theta ) { double area = ( Math . Abs ( Math . Sin ( ( theta * Math . PI ) / 180 ) ) / 2 ) * Math . Abs ( d1 * d2 ) ; return area ; } public static void Main ( String [ ] args ) { int d1 = 3 ; int d2 = 5 ; int theta = 90 ; double area = Area_Parallelogram3 ( d1 , d2 , theta ) ; Console . Write ( " { 0 : F2 } " , area ) ; } }