下面程序的功能是判断三角形的形状(等边三角形不单独考虑),其中存在错误,请指出在什么情况下程序输出错误,可填写:直角三角形、等腰三角形、直角等腰三角形、一般三角形、不是三角形之一。 include <stdio.h> include <math.h> int main(void) { float a, b, c; printf("Input the three edge length:"); scanf("%f, %f, %f", &a, &b, &c); if (a+b>c && b+c>a && a+c>b) /*三角形的基本条件*/ { if (a==b || b==c || c==a) printf("等腰"); else if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a) printf("直角"); else printf("一般

时间:2023-12-28 01:51:50

相似题目