Program to calculate the area of Kite
Kite is something like rhombus but in Kite, the adjacent sides are equal and diagonals are generally not equal.
- Method 1: When bboth the diagonals are given
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:
C++
// C++ implementation of the approach#include <bits/stdc++.h>usingnamespacestd;// Function to return the area of kitefloatareaOfKite(intd1,intd2){// use above formulafloatarea = (d1 * d2) / 2;returnarea;}// Driver codeintmain(){intd1 = 4, d2 = 6;cout <<"Area of Kite = "<< areaOfKite(d1, d2);return0;}chevron_rightfilter_noneJava
// Java implementation of the approachclassGFG{// Function to return the area of kitestaticfloatareaOfKite(intd1,intd2){// Use above formulafloatarea = (d1 * d2) /2;returnarea;}// Driver codepublicstaticvoidmain(String[] args){intd1 =4, d2 =6;System.out.println("Area of Kite = "+ areaOfKite(d1, d2));}}// This code is contributed by Rajput-Jichevron_rightfilter_nonePython3
# Python implementation of the approach# Function to return the area of kitedefareaOfKite(d1, d2):# use above formulaarea=(d1*d2)/2;returnarea;# Driver coded1=4;d2=6;print("Area of Kite = ",areaOfKite(d1, d2));# This code is contributed by Rajput-Jichevron_rightfilter_noneC#
// C# implementation of the approachusingSystem;classGFG{// Function to return the area of kitestaticfloatareaOfKite(intd1,intd2){// Use above formulafloatarea = (d1 * d2) / 2;returnarea;}// Driver codepublicstaticvoidMain(){intd1 = 4, d2 = 6;Console.WriteLine("Area of Kite = "+ areaOfKite(d1, d2));}}// This code is contributed by anuj_67..chevron_rightfilter_noneOutput:Area of Kite = 12
- Method 2: When side a, b and angle are given:
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:
C++
// C++ implementation of the approach#include <bits/stdc++.h>#define PI 3.14159 / 180usingnamespacestd;// Function to return the area of the kitefloatareaOfKite(inta,intb,doubleangle){// convet angle degree to radiansangle = angle * PI;// use above formuladoublearea = a * b *sin(angle);returnarea;}// Driver codeintmain(){inta = 4, b = 7, angle = 78;cout <<"Area of Kite = "<< areaOfKite(a, b, angle);return0;}chevron_rightfilter_noneJava
// Java implementation of the approachimportjava.io.*;classGFG{staticdoublePI = (3.14159/180);// Function to return the area of the kitestaticfloatareaOfKite(inta,intb,doubleangle){// convet angle degree to radiansangle = angle * PI;// use above formuladoublearea = a * b * Math.sin(angle);return(float)area;}// Driver codepublicstaticvoidmain (String[] args){inta =4, b =7, angle =78;System.out.println ("Area of Kite = "+ areaOfKite(a, b, angle));}}// This code is contributed by jit_t.chevron_rightfilter_nonePython3
# Python implementation of the approachimportmathPI=3.14159/180;# Function to return the area of the kitedefareaOfKite(a, b, angle):# convet angle degree to radiansangle=angle*PI;# use above formulaarea=a*b*math.sin(angle);returnarea;# Driver codea=4; b=7; angle=78;print("Area of Kite = ",areaOfKite(a, b, angle));# This code contributed by PrinciRaj1992chevron_rightfilter_noneC#
// C# implementation of the approachusingSystem;classGFG{staticdoublePI = (3.14159 / 180);// Function to return the area of the kitestaticfloatareaOfKite(inta,intb,doubleangle){// convet angle degree to radiansangle = angle * PI;// use above formuladoublearea = a * b * Math.Sin(angle);return(float)area;}// Driver codestaticpublicvoidMain (){inta = 4, b = 7, angle = 78;Console.WriteLine("Area of Kite = "+ areaOfKite(a, b, angle));}}// This code is contributed by ajitchevron_rightfilter_noneOutput:Area of Kite = 27.3881
Recommended Posts:
- Java Program for Program to calculate area of a Tetrahedron
- Python Program for Program to calculate area of a Tetrahedron
- Program to calculate Area Of Octagon
- Program to calculate area of Enneagon
- Program to calculate area of a Tetrahedron
- Program to calculate area and volume of a Tetrahedron
- Program to calculate area and perimeter of Trapezium
- Program to calculate the area between two Concentric Circles
- Program to calculate area of an Circle inscribed in a Square
- Program to calculate area of Circumcircle of an Equilateral Triangle
- Program to calculate Volume and Surface area of Hemisphere
- Program to calculate area and perimeter of a rhombus whose diagonals are given
- Program to calculate the Surface Area of a Triangular Prism
- Program to calculate area and perimeter of equilateral triangle
- Program to calculate the Area and Perimeter of Incircle of an Equilateral Triangle
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.




