Area of a triangle
#include<stdio.h>
int main()
{
//Area of a triangle = 0.5*base*height
float base, height, area;
printf("Enter the base and height value : ");
scanf("%f %f", &base, &height);
area = 0.5*base*height;
printf("Area of Triangle is: %.2f",area);
return (0);
}
No comments:
Post a Comment