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...
Which part of the CPU is the "director of operations?"
A. CU B. ALU C. register D. system bus
Computer Science & Information Technology
Air waves are an example of what type of network component?
A. Network Interface Card B. network medium C. interconnecting device D. network protocol
Computer Science & Information Technology