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...
A(n) _______ is the letter sequence of a variable’s name.
Fill in the blank(s) with the appropriate word(s).
Computer Science & Information Technology
You can change the InDesign page numbering style using the Organization and Bullet Options dialog box.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology
To ensure that two hyphenated words appear on the same line, you would insert a ________ hyphen between them
A) nonbreaking B) simple C) binding D) continuous
Computer Science & Information Technology
Describe characteristic of utility as it relates to information.
What will be an ideal response?
Computer Science & Information Technology