c语言找错误#include #include #includefloat area (float a,float b,float c){float area,p;p=(a+b+c)/2;area=sqrt(p*(p-a)*(p-b)*(p-c));return area;}main(){float x,y,z,ts;scanf("%d%d%d",&x,&y,&z);if(((x+y)>z)&&((y+z)>x)){ts=area(x,y,z);/*或者用scan

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/22 23:20:28
c语言找错误#include#include#includefloatarea(floata,floatb,floatc){floatarea,p;p=(a+b+c)/2;area=sqrt(p*(p

c语言找错误#include #include #includefloat area (float a,float b,float c){float area,p;p=(a+b+c)/2;area=sqrt(p*(p-a)*(p-b)*(p-c));return area;}main(){float x,y,z,ts;scanf("%d%d%d",&x,&y,&z);if(((x+y)>z)&&((y+z)>x)){ts=area(x,y,z);/*或者用scan
c语言找错误
#include
#include
#include
float area (float a,float b,float c){
float area,p;
p=(a+b+c)/2;
area=sqrt(p*(p-a)*(p-b)*(p-c));
return area;
}
main(){
float x,y,z,ts;
scanf("%d%d%d",&x,&y,&z);
if(((x+y)>z)&&((y+z)>x))
{ts=area(x,y,z);
/*或者用scanf()输入abc的值*/
printf("area=%f\n",ts);}
else
printf("data error!");
system("pause");
} 都是0.

c语言找错误#include #include #includefloat area (float a,float b,float c){float area,p;p=(a+b+c)/2;area=sqrt(p*(p-a)*(p-b)*(p-c));return area;}main(){float x,y,z,ts;scanf("%d%d%d",&x,&y,&z);if(((x+y)>z)&&((y+z)>x)){ts=area(x,y,z);/*或者用scan
scanf("%d%d%d",&x,&y,&z);
应该用
scanf("%f%f%f",&x,&y,&z);