救救孩子吧
查看原帖
救救孩子吧
1576075
palpitate_sl楼主2024/11/20 22:51

83分求助

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int a, b, c,zdz,zj;
	scanf("%d %d %d", &a, &b, &c);
	if (b + c < a || b + a < c || a + c < b)
		printf("Not triangle");
	else
	{
	if (a<b)
	{
		zj = a; a = b; b = zj;
	}
	if (a < c)
	{
		zj = a; a = c; c = zj;
	}
	if (b < c)
	{
		zj = b; b = c; c = zj;
	}
	
		if (a * a == b * b + c * c)
			printf("Right triangle\n");
		if (b * b + c * c > a * a)
			printf("Acute triangle\n");
		if (b * b + c * c < a * a)
			printf("Obtuse triangle\n");
		if (a == b || a == c || c == b)
			printf("Isosceles triangle\n");
		if (a == b && b == c)
			printf("Equilateral triangle\n");
	}
	return 0;
}
2024/11/20 22:51
加载中...