题目意思:判断一个三角形是钝角还是锐角还是直角
#include<stdio.h> int main() { int n,a,b,c,k=1; scanf("%d",&n); while(n--) { scanf("%d %d %d",&a,&b,&c); if(a*a + b*b == c*c || a*a + c*c == b*b || b*b + c*c == a*a) printf("Case %d: Right triangle\n",k); else if(a*a + b*b < c*c || a*a + c*c < b*b || b*b + c*c < a*a) printf("Case %d: Obtuse triangle\n",k); else if(a*a + b*b > c*c || a*a + c*c > b*b || b*b + c*c > a*a) printf("Case %d: Acute triangle\n",k); k++; } return 0; }