哪位大神帮忙看下这段代码,哪里出错了,找了半天都找不出来
#include<stdio.h>#include<math.h>
#define S(a,b,c) (0.5)*(a + b + c)
#define AREA(s,a,b,c) (sqrt(s*(s - a)*(s - b)*(s - c)))
void main()
{
double x,y,z,s,area;
printf("请输入三角形的三边长:\n");
scanf("%f%f%f",&x,&y,&z);
s = S(x,y,z);
area = AREA(s,x,y,z);
printf("s = %f\narea = %f\n",s,area);
} 第12行应该为:scanf("%lf%lf%lf",&x,&y,&z); {:9_232:}{:9_232:}
页:
[1]