Before writing the program of calculating the area of rhombus in different programming languages, firstly we have to know about what is rhombus and what is the formula to find area of it?
What is Rhombus?
A rhombus is a polygon, whose all four sides is equal in length and opposite side is parallel.
Area of Rhombus = ( d1 * d2 ) / 2
Where, d1 and d2 are the two diagonals of rhombus.
Program of calculating the area of a rhombus in different Programming languages
Program 1: Write a Program in C language:
Output of Above C program:
Program 2: Write a Program in Java language:
Output of Above Java program:
Program 3: Write a Program in PHP programming language.
Output of Above PHP program:
Program 4: Write a Program in Python programming language.
Output of Above Python program: