#include <stdio.h>
#include <math.h>
int main()
{
int a,b,c,p,s;
printf("请输入数据:\n");
scanf("%d%d%d",&a,&b,&c);
if( a+b > c && b+c > a && a+c>b)
{
p = (a+b+c)/2;
s = sqrt(p*(p-a)*(p-b)*(p-c));
printf("s=%d \n",s);
}
else
{
printf("error");
}
}
05-12
1874
06-05
5539
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交