Thursday, 16 November 2017

C Program to Find Area of Rhombus


Code:

#include   stdio.h

int main()
{
    float diagonal1, diagonal2;
    float area;

    printf("Enter diagonals of the given rhombus: \n ");
    scanf("%f%f", &diagonal1, &diagonal2);
    area = 0.5 * diagonal1 * diagonal2;
    printf("Area of rhombus is: %.3f \n", area);
    return 0;
}

Output:

Enter diagonals of the given rhombus:
 30 40
Area of rhombus is: 600.000


More C Programs:













100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...