Given two integers **A** and **X**, denoting the length of a side of a rhombus and an angle respectively, the task is to find the area of the rhombus.

A

rhombusis a quadrilateral having 4 sides of equal length, in which both the opposite sides are parallel, and opposite angles are equal.

**Examples:**

Input:A = 4, X = 60Output:13.86

Input:A = 4, X = 30Output:8.0

**Approach:**For a Rhombus **ABCD** having the length of a side **a** and an angle **x**, the area of triangle **ABD **can be calculated using Side-Angle-Side property of triangle by the following equation:

Area of Triangle

ABD = 1/2 (a^{2}) sin x

Area of RhombusABCDwill be double the area ofABDtriangle.Therefore, Area of Rhombus

ABCD=(a^{2}) sin x

Below is the implementation of the above approach:

## C++

`// C++ Program to calculate` `// area of rhombus from given` `// angle and side length` `#include <bits/stdc++.h>` `using` `namespace` `std;` `#define RADIAN 0.01745329252` `// Function to return the area of rhombus` `// using one angle and side.` `float` `Area_of_Rhombus(` `int` `a, ` `int` `theta)` `{` ` ` `float` `area = (a * a) * ` `sin` `((RADIAN * theta));` ` ` `return` `area;` `}` `// Driver Code` `int` `main()` `{` ` ` `int` `a = 4;` ` ` `int` `theta = 60;` ` ` `// Function Call` ` ` `float` `ans = Area_of_Rhombus(a, theta);` ` ` `// Print the final answer` ` ` `printf` `(` `"%0.2f"` `, ans);` ` ` `return` `0;` `}` `// This code is contributed by Rajput-Ji` |

*chevron_right*

*filter_none*

## Java

`// Java Program to calculate` `// area of rhombus from given` `// angle and side length` `class` `GFG{` `static` `final` `double` `RADIAN = ` `0.01745329252` `;` ` ` `// Function to return the area of rhombus` `// using one angle and side.` `static` `double` `Area_of_Rhombus(` `int` `a, ` `int` `theta)` `{` ` ` `double` `area = (a * a) * Math.sin((RADIAN * theta));` ` ` `return` `area;` `}` `// Driver Code` `public` `static` `void` `main(String[] args)` `{` ` ` `int` `a = ` `4` `;` ` ` `int` `theta = ` `60` `;` ` ` `// Function Call` ` ` `double` `ans = Area_of_Rhombus(a, theta);` ` ` `// Print the final answer` ` ` `System.out.printf(` `"%.2f"` `, ans);` `}` `}` `// This code is contributed by Rajput-Ji` |

*chevron_right*

*filter_none*

## Python3

`# Python3 Program to calculate ` `# area of rhombus from given ` `# angle and side length` ` ` `import` `math ` ` ` `# Function to return the area of rhombus ` `# using one angle and side. ` `def` `Area_of_Rhombus(a, theta): ` ` ` ` ` `area ` `=` `(a` `*` `*` `2` `) ` `*` `math.sin(math.radians(theta))` ` ` ` ` `return` `area ` ` ` `# Driver Code ` `a ` `=` `4` `theta ` `=` `60` ` ` `# Function Call ` `ans ` `=` `Area_of_Rhombus(a, theta) ` ` ` `# Print the final answer` `print` `(` `round` `(ans, ` `2` `)) ` |

*chevron_right*

*filter_none*

## C#

`// C# Program to calculate` `// area of rhombus from given` `// angle and side length` `using` `System;` `class` `GFG{` `static` `readonly` `double` `RADIAN = 0.01745329252;` ` ` `// Function to return the area of rhombus` `// using one angle and side.` `static` `double` `Area_of_Rhombus(` `int` `a, ` `int` `theta)` `{` ` ` `double` `area = (a * a) * Math.Sin((RADIAN * theta));` ` ` `return` `area;` `}` `// Driver Code` `public` `static` `void` `Main(String[] args)` `{` ` ` `int` `a = 4;` ` ` `int` `theta = 60;` ` ` `// Function Call` ` ` `double` `ans = Area_of_Rhombus(a, theta);` ` ` `// Print the readonly answer` ` ` `Console.Write(` `"{0:F2}"` `, ans);` `}` `}` `// This code is contributed by Rajput-Ji` |

*chevron_right*

*filter_none*

**Output:**

13.86

**Time Complexity:** O(1)**Auxiliary Space:** O(1)

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready.

## Recommended Posts:

- Area of Triangle using Side-Angle-Side (length of two sides and the included angle)
- Length of diagonals of a Rhombus using length of Side and vertex Angle
- Nth angle of a Polygon whose initial angle and per angle increment is given
- Program to calculate area of a rhombus whose one side and diagonal are given
- Angle subtended by the chord when the angle subtended by another chord of same length is given
- Program to calculate area and perimeter of a rhombus whose diagonals are given
- Angle between a chord and a tangent when angle in the alternate segment is given
- Exterior angle of a cyclic quadrilateral when the opposite interior angle is given
- Angle subtended by the chord to center of the circle when the angle subtended by the another equal chord of a congruent circle is given
- Program to calculate angle on circumference subtended by the chord when the central angle subtended by the chord is given
- Area of the biggest possible rhombus that can be inscribed in a rectangle
- Area of circle inscribed within rhombus
- Area of a n-sided regular polygon with given side length
- Area of a largest square fit in a right angle triangle
- Program to print solid and hollow rhombus patterns
- Length of the chord of the circle whose radius and the angle subtended at the center by the chord is given
- Find side of Square which makes minimal area to fit two identical rectangles inside it
- Radius of the biggest possible circle inscribed in rhombus which in turn is inscribed in a rectangle
- Arc length from given Angle
- Area of a Square | Using Side, Diagonal and Perimeter

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.