#include<stdio.h>
#include< math.h >
void main()
{
int a,b,c;
float x,S;
scanf("%d,%d,%d",&a,&b,&c);
if((a+b>c)||(a+c>b)||(b+c>a))
{
x = (a + b + c) / 2.0;
S = sqrt(x * (x - a) * (x - b) * (x - c));
printf("area = %.3f\n", S);
}
else printf("不能构成三角形\n");
}
p122 .10. 三角形面积
最新推荐文章于 2024-09-14 20:40:26 发布