Here, we will read diagonal1, diagonal2 of the rhombus from the user. Then we will calculate the area of the rhombus and print the result.
Area of the rhombus formula = ½ × d1 × d2
Where d1 is the length of diagonal 1 and d2 is the length of diagonal 2.
Program/Source Code:
The source code to calculate the area of the rhombus is given below. The given program is compiled and executed successfully.
Output:
Explanation:
Here, we read the value of diagonal1, diagonal2 from the user. Then we calculated the area of the rhombus and printed the result.
need an explanation for this answer? contact us directly to get an explanation for this answer