Write Boolean expressions that represent the given English expressions. Assume any variables used have been declared and initialized.

a) alpha is greater than 1
b) x is odd
c) x and y are odd
d) ch is an upper case alphabetic character (between 'A' and 'Z').
e) digit, which is f type char, has value that is indeed a digit.


a. alpha > 1
b. (x%2==1)
c. (x % 2==1) && (y % 2==1)
d. ('A' <= ch) && (ch <= 'Z')
e. ('0' <= digit) && (digit <= '9')

Computer Science & Information Technology

You might also like to view...

Asymmetric encryption can be used for __________ .

A. both confidentiality and authentication B. neither confidentiality nor authentication C. confidentiality D. authentication

Computer Science & Information Technology

In comparing the OSI model to the TCP/IP model, which of the following layers of the OSI model are equivalent to the Application layer in the TCP/IP model?

A) Application B) Presentation C) Session D) Transport E) Network F) Data link G) Physical

Computer Science & Information Technology

The proper voltage from a wall outlet is

A) +5 to +12 volts DC B) 90 to 100 volts AC C) 110 to 130 VAC D) More than 200 volts AC

Computer Science & Information Technology

Why should the risks of an organization be reported as defined by enterprise risk management (ERM)?

A It is a means to predict loss, select countermeasures, and reduce downtime. B It is a government regulation. C It helps with internal transparency, risk assessment, risk response, and risk monitoring. D It assists with strategic planning, compliance, and training.

Computer Science & Information Technology