Chapter 3 Flashcards
define boolean expression
an expression that evaluates to a boolean value: true or false.
define boolean expression
an expression that evaluates to a boolean value: true or false.
What is the operator for less than?
What is the operator for less than or equal to?
<=
What is the operator for greater than?
>
What is the operator for greater than or equal to?
> =
which is correct => or >= ?
> =
what is the operator for equal to?
==
what is the operator for not equal to?
!=
Which is correct != or =! ?
!=
what is the bool data type used for?
it is used for declaring boolean variables
____ and ___ are boolean literals
true and false
____ statements executes an action if and only if the condition is true
if
____ statements executes an action if and only if the condition is true
if
what is the syntax for an if-else statement?
if (boolean-expression) { statement(s)-for-the-true-case; } else { statement(s)-for-the-false-case; }
What is the operator for less than or equal to?
<=
what function can you use to generate a random integerr?
rand( )
What is the operator for greater than or equal to?
> =
which is correct => or >= ?
> =
what is the operator for equal to?
==
what is the operator for not equal to?
!=