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
This note was uploaded on 11/30/2009 for the course COMP 110 taught by Professor Stotts during the Spring '08 term at UNC.
- Spring '08