C program to find an area of rhombus.

 

01  #include <stdio.h>
02 #include <math.h>
03
04 int main()
05 {
06 int d1,d2;
07 float area;
08
09 printf("Enter the values of diagonals (D1 and D2) : n");
10 scanf("%d %d", &d1, &d2);
11
12 area = (d1*d2)/2;
13
14 printf("Area of the Rhombus = %.2f n", area);
15 return 0;
16 }
 
 OUTPUT :

Enter the values of diagonals (D1 and D2) :

10
20

Area of the Rhombus = 100.00

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *