帮帮我啊
#include<math.h> main() { float a,b,c,s,area; scanf("%f%f%f",&a,&b,&c); s=(a+b+c)/2; area=sqrt(s*(s-a)*(s-b)*(s-c)); printf("area=%f\n",area); }
各位高手帮我看看啊,我得不到area的值啊!!
----------------解决方案--------------------------------------------------------
改了一下可以了!
#include<stdio.h>#include<math.h>
main()
{
float a,b,c,s;
double area;
scanf("%f%f%f",&a,&b,&c);
s=(a+b+c)/2;
area=sqrt(s*(s-a)*(s-b)*(s-c));
printf("area=%f\n",area);
}
----------------解决方案--------------------------------------------------------