Lvalue required as left operand of assignment

1

I get this error

  

lvalue required as left operand of assignment

in the code

if (a*a = b*b + c*c) {
    printf ("TRIANGULO RETANGULO\n");}
    
asked by anonymous 18.05.2017 / 00:39

1 answer

1

You want to make a comparison, right? Then use the correct operator for comparisons and do not use the assignment operator:

if (a * a == b * b + c * c) {
    printf("TRIANGULO RETANGULO\n");
}
    
18.05.2017 / 00:49