CodeLab 10.23.06

CodeLab 10.23.06 - CodeLab: 10.23.06 Write a literal...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CodeLab : 10.23.06 Write a literal representing the false value. false Write a literal representing the true value. true Declare a variable isACustomer suitable for representing a true or false value. boolean isACustomer; Write an expression that evaluates to true if and only if the value of the integer variable x is equal to zero. x == 0 Write an expression that evaluates to true if and only if the variables profits and losses are exactly equal. profits == losses Given the char variable c , write an expression that is true if and only if c does not contain a blank. c != ' ' Write an expression that evaluates to true if the value of index is greater than the value of lastIndex. index > lastIndex Working overtime is defined as having worked more than 40 hours during the week. Given the variable hoursWorked , write an expression that evaluates to true if the employee worked overtime. hoursWorked > 40 Write an expression that evaluates to true if the value x is greater than or equal to y. x >= y Given the variables numberOfMen and numberOfWomen , write an expression that evaluates to true if the number of men is greater than or equal to the number of women.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
numberOfMen >= numberOfWomen Given a double variable called average , write an expression that is true if and only if the variable's value is less than 60.0. average < 60.0
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/29/2008 for the course CS 302 taught by Professor Willbenton during the Fall '07 term at Wisconsin.

Page1 / 4

CodeLab 10.23.06 - CodeLab: 10.23.06 Write a literal...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online