c语言实验二(3)

# include <stdio.h>

int main()

{double a=0.0,b=0.0,c=0.0;

printf("input three numbers:");

scanf("%lf,%lf,%lf",&a,&b,&c);

if(a==b&&b==c&&a==c)

printf("等边三角形");

else if(a==b||b==c||a==c)

printf("等腰三角形");

else if(a*a==b*b+c*c||b*b==a*a+c*c||c*c==a*a+b*b)

printf("直角三角形");

else if(a+b>c&&b+c>a&&a+c>b)

printf("一般三角形");

return 0;

}

posted @ 2019-04-25 15:08  201821430014  阅读(88)  评论(0编辑  收藏  举报