whats up everyone,
It's your friendly neighborhood chap in again for some crazy tales of danger...well not really...just another question to make you roll your eyes in disgust, haha. So in this book I'm reading there's an example of an if statement that says:
and then a few lines later in the book the author says that the following code would have the exact same effect:Code:if (x%7 == 0 && y%7==0)
cout << "There's a mushroom here.\n";
Code:if ( !(x%7) && !(y%7) )
cout << "There's a mushroom here.\n";
Now I thought I had a firm grasp on many concepts...but I'm not understanding how the 2 if statements mean the same thing...any insight into this? Chap = :confused: