#include
main()
{
double a,b,c,s;
double sabc(double,double,double);
printf("請輸入三角形三邊長:");
scanf("%f%f%f",&a,&b,&c);
s=sabc(a,b,c);
printf("s=%f",s);
}
#include
double sabc(double a,double b,double c)
{
double s,p;
p=(a+b+c)/2;
s=sqrt(p*(p-a)*(p-b)*(p-c));
return s;
}
double格式用%lf