include
#include
#define S (a+b+c)/2
#define AREA(a,b,c) sqrt(S*(S-a)*(S-b)*(S-c))
main()
{
float a,b,c;
printf("Please input the rim lengthes of the triangle:\n");
scanf("%f%f%f",&a,&b,&c);
printf("The area of the triangle is %-5.2f.\n",AREA(a,b,c));
}
#include
#include
#define k(a,b,c) ((a+b+c)/2)
#define area(l,a,b,c) sqrt(l*(l-a)*(l-b)*(l-c))
main()
{float x,y,z,S,AREA;x=3;y=4;z=5;
S=k(x,y,z);
AREA=area(S,x,y,z);
printf("%0.2f\t%0.2f\n",S,AREA);
}