We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey Coders, can you tell me what's wrong here? I want to reset "a" when it reaches 100. Thanks!!!
Change the if statement to this
if (i == 0) {
= is the assignment operator so in your if statement it assigns the value 100 to a and because the assignment paases the value on it attempts to convert the integer 100 to a boolean because the if statement expects a boolean expression.
a
The == operator tests for equality.
Perfect! Thank you quark!
Answers
Change the if statement to this
if (i == 0) {
= is the assignment operator so in your if statement it assigns the value 100 to
a
and because the assignment paases the value on it attempts to convert the integer 100 to a boolean because the if statement expects a boolean expression.The == operator tests for equality.
Perfect! Thank you quark!