This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: b. is less than or equal to: _________ c. is not equal to: _________ 4. (8 pts) Complete the following table (known as a "truth table") by writing either True or False on each blank line. For example, the first blank asks for the result of (A && B) when A is True and B is True. A B A && B A || B True True _________ _________ True False _________ _________ False True _________ _________ False False _________ _________ 5. (8 pts) Let grade be a char variable, and let score be an int variable that has already been assigned a value. Write an if/else structure that sets grade to: 'A' if score is greater than or equal to 90, 'B' if score is at least 80 but less than 90, 'C' if score is at least 70 but less than 80, 'D' if score is at least 60 but less than 70, or 'F' if score is less than 60. ALSO BEFORE LAB: Skip ahead and read section 4.4 (especially pp. 169-171 about random integers). End of LabHW3...
View Full Document
- Spring '11