Friday, 30 May 2014

Program to calculate area of a triangle. Base and height given by the user.

#include<stdio.h>

main()
{
    float l,b,area;
    printf("\nEnter base and height of the triangle=");
    scanf("%f%f",&b,&h);
    area=0.5*b*h;
    printf("\nThe area=%d",area);
}

No comments:

Post a Comment