+ 1

What is the error in "while (y * z > 0) & (y % 10 == z % 10)"?

It keep saying "lvalue required as unary '&' operand".

16th Mar 2021, 5:28 PM
Romania005 #01
Romania005 #01 - avatar
1 Respuesta
+ 5
Conditions are concatenated by the AND operator &&, the single ampersand & is a different operator. Also, the entire condition should be enclosed in parentheses, not only the left and right side of &&, if that is what you are going for.
16th Mar 2021, 5:34 PM
Shadow
Shadow - avatar