野生答案

没有名字的屑喵  •  1个月前


include <stdio.h>

include <math.h>

int main() {

double a, b, c, d, e, f, C1, C2, s, S;
scanf("%lf %lf %lf", &a, &b, &c);
if (a + b > c && a + c > b && b + c > a) {
	double C1 = a + b + c;
	double C2 = C1 / 2;
	double d = C2 - a;
	double e = C2 - b;
	double f = C2 - c;
	double s = C2 * d * e * f;
	double S = sqrt(s);
	printf("%.2lf", S);
} else {
	printf("no");
}
return 0;

}


评论:

请先登录,才能进行评论