void rectan(){
double a,b,c, square;
double tmp;
char max;
scanf("%lf%lf%lf",&a,&b,&c);
if( a == b || b==c || a ==c){//等腰三角形一定為銳角(包含等邊)
printf("銳角三角形\n");
return;
}
//將角C選為最大角,若輸入不是此交換使C最大
max = a>b?(tmp = a,"a"):(tmp = b,"b");
max = tmp>c?max:(tmp = c,"c");
if(max != "c"){
tmp = a;
a = c;
c = tmp;
//兩銳角所對的邊的平方和
square = a*a + b*b;
//由余弦定理:cosC = (a*a + b*b - c*c)/(2ab) , 判斷最大角C的正負號
//就是判斷 a*a+b*b - c*c的正負號
if( c*c == square)//相等是直角
printf("直角三角形\n");
else if(c*c
else//相減為負數為鈍角
void rectan(){
double a,b,c, square;
double tmp;
char max;
scanf("%lf%lf%lf",&a,&b,&c);
if( a == b || b==c || a ==c){//等腰三角形一定為銳角(包含等邊)
printf("銳角三角形\n");
return;
}
//將角C選為最大角,若輸入不是此交換使C最大
max = a>b?(tmp = a,"a"):(tmp = b,"b");
max = tmp>c?max:(tmp = c,"c");
if(max != "c"){
tmp = a;
a = c;
c = tmp;
}
//兩銳角所對的邊的平方和
square = a*a + b*b;
//由余弦定理:cosC = (a*a + b*b - c*c)/(2ab) , 判斷最大角C的正負號
//就是判斷 a*a+b*b - c*c的正負號
if( c*c == square)//相等是直角
printf("直角三角形\n");
else if(c*c
printf("銳角三角形\n");
else//相減為負數為鈍角
printf("銳角三角形\n");
}