This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Termination The program will end after the user gives a pair of numbers where the first is 0. Notes Test for equality Note that in the "if" statement, we compare the value of the variable "first" to 0. We are testing it for equality, and the boolean operator for equals is "==". A common error is to use "=" to compare for equality, but "=" is the assignment operator and if you use that in a boolean expression your program will give erroneous results....
View Full Document
- Spring '08