Electrical and Computer Engineering
6 of 21
UAH
CPE 112
Conditions and Logical Expressions
•Asking questions in C++ means making an assertion that is either true or false.
•The computer evaluates the assertion.
•We have a new data type that is used in assertions, bool. It has two possible values true and false.
•We declare variables of type bool in the same way we declare variables of other types.
–Example bool dataOK;