Thursday, 16 November 2017

C Program to Find Area of a Right Angled Triangle


Code:

#include   stdio.h

int main()
{
    float height, width;
    float area;

    printf("Enter height and width of the given triangle:\n ");
    scanf("%f%f", &height, &width);
    area = 0.5 * height * width;
    printf("Area of right angled triangle is: %.3f\n", area);
    return 0;
}


Output:

Enter height and width of the given triangle:
 10 15
Area of right angled triangle is: 75.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...