三角形

注意: 输入的边长可能是小数

#include <cstdio>

int main()
{
	int n;
	double a, b, c;
	scanf("%d", &n);
	while(n --)
	{
		scanf("%lf %lf %lf", &a, &b, &c);
		if((a+b>c) && (a+c>b) && (b+c>a))	printf("YES
");
		else	printf("NO
");
	}
	
	return 0;
}

  

原文地址:https://www.cnblogs.com/mjn1/p/11283728.html