为什么这儿定义p和s用double?
#include <stdio.h>
#include <math.h>
int main()
{int a,b,c;
double p,s;
printf("please input the value of a,b,c\n");
scanf("%d %d %d",&a,&b,&c);
if(a+b>c&&a-b<c)
{
p=(a+b+c)/2.0;
s=sqrt(p*(p-a)*(p-b)*(p-c));
printf("Yes,this is a triangle!\nthe area is %.2f\n",s);
}
else printf("No,this is not a triangle!\n");
return 0;
}