0&&c>0) { if(a==b&&b==c) printf(\"etc. Side triangle\n\"); else if(b=" />
Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language triangle
C language triangle

#include

void main()

{

float a,b,c;

printf("Enter three numbers:");

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

if (a0&&b>0&&c>0)

{

if(a==b&&b==c) printf("etc. Side triangle\n");

else if(b==c&&b!=a||a==b&&a!=c||a==c&&c!=b) printf("Isosceles triangle\ n");

if((a*a+b*b==c*c)||(a*a+c*c==b*b)||(b*b+ c*c==a*a)) printf("right triangle");

}

else

{

if (a<=0||b<=0||c<=0) printf("The input number is illegal\n");

if(a>=b+c||b>= a+c||c>=a+c) printf("The sum of the two sides is greater than the third side\n");

}

}

I tried it, and if I change float a, b, c to int type, there will be no error message for the a^2 equation. I think it should be that X in X^Y must be plastic. And your if(a==b==c) expressions cannot be written like that.