## CS 1401, Quiz #5

**Date:** Tuesday, February 20, 2007

**Name:** ____________________________________________________________

**Class section** (9:00 am or 10:30 am): _______________________________
1. For each of the following topics,
write "yes" or "no" depending on whether this topic is covered in
Chapter 5, the chapter that you were supposed to read before the class:

while loops

2-dimensional arrays

for loops

user-defined methods

2. Draw truth tables for "and" and "or" and use these truth tables
to find the truth value of the statement
((3 > 2) || (2 > 3)) && (2 + 2 == 4).

3. Write down a statement that, given three real numbers *a*,
*b*, and *x*, assigns, to a Boolean variable *in*:
- the value
*true* if *x* is within the closed interval
[*a*, *b*] (i.e., if a <= x <= b) and
- value
*false* otherwise.