Javatpoint Logo
Javatpoint Logo

Write a Program to calculate the Area of Rhombus

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.

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:

Enter the 1st diagonal of the rhombus:5
Enter the 2nd diagonal of the rhombus:10
Area of the rhombus is: 25.0

Program 2: Write a Program in Java language:

Output of Above Java program:

The Area of a rhombus in Java:
400

Program 3: Write a Program in PHP programming language.

Output of Above PHP program:

1200

Program 4: Write a Program in Python programming language.

Output of Above Python program:

600.0





Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA