30.10 Answers to Chapter Questions
Answer 30-1: The statement (number =! 2) is not a relational
equation, but an assignment statement. It is equivalent to:
number = (!2);
(Because 2 is nonzero, !2 is zero.)
The programmer accidently reversed the not equal
!=, so it became =!. The
statement should read:
if (number != 2)
|