Lvalue required as left operand of assignment

Asked

Viewed 4,962 times

1

I get this mistake

lvalue required as left operand of assignment

in the code

if (a*a = b*b + c*c) {
    printf ("TRIANGULO RETANGULO\n");}

1 answer

1


You want to make a comparison, right? Then use the correct operator for comparisons and don’t use the assignment operator:

if (a * a == b * b + c * c) printf("TRIANGULO RETANGULO\n");
  • Thank you very much!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.