triangle area finding
#include <stdio.h>
#include <math.h>
int main()
{
float a,b,c,sp,area,squareroot,num;
printf("\n Enter sides of triangle\n");
scanf("%f %f %f",&a,&b,&c);
sp=(a+b+c)/2;
num =(sp*(sp-a)*(sp-b)*(sp-c));
area = sqrt(num);
printf("Area of triangle %f\n",area);
return 0;
}
Comments
Post a Comment