VOOZH about

URL: https://www.geeksforgeeks.org/dsa/program-to-calculate-the-area-of-kite/

⇱ Program to calculate the area of Kite - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Program to calculate the area of Kite

Last Updated : 31 May, 2022

Kite is something like rhombus but in Kite, the adjacent sides are equal and diagonals are generally not equal. 
 

Method 1: When both the diagonals are given
👁 Image

If diagonals d1 and d2 are given of the kite, then the area of a kite is half of product of both the diagonals i.e.
 


Example:
 

Input: d1 = 4, d2 = 6
Output: Area of Kite = 12

Input: d1 = 5, d2 = 7
Output: Area of Kite = 17.5


Approach: In this method we simply use above formula.
Below is the implementation of the above approach:
 


Output: 
Area of Kite = 12

 

Time Complexity: O(1)

Auxiliary Space: O(1)

Method 2: When side a, b and angle are given: 
 👁 Image

When the unequal sides of kite a and b and the included angle Θ between them are given, then 
 


Example: 
 

Input: a = 4, b = 7, θ = 78
Output: Area of Kite = 27.3881

Input: a = 6, b = 9, θ = 83
Output: Area of Kite = 53.5975


Approach: In this method we simply use above formula.
Below is the implementation of the above approach:
 


 


Output: 
Area of Kite = 27.3881

 

Time Complexity: O(1)

Auxiliary Space: O(1)

Comment