Write a single statement that prints a number at random from each of the following sets:
a) 2, 4, 6, 8, 10.
b) 3, 5, 7, 9, 11.
c) 6, 10, 14, 18, 22.
```
a) cout << 2 * (1 + rand() % 5)) << ’\n’;
b) cout << 1 + 2 * (1 + rand() % 5)) << ’\n’;
c) cout << 6 + 4 * (rand() % 5) << ’\n’;
```
Computer Science & Information Technology
You might also like to view...
The Process SmartArt graphic can show steps in a timeline
Indicate whether the statement is true or false
Computer Science & Information Technology
A client purchases a new wireless printer and wants to be able to bond it to their PDA. Which of the following technologies BEST describes the type of wireless printer that was purchased?
A. Bluetooth B. WiFi C. IEEE 1394 D. 802.11a
Computer Science & Information Technology