Write statements that assign random integers to the variable n in the following ranges:
```
a) 1 n 2.
b) 1 n 100.
c) 0 n 9.
d) 1000 n 1112.
e) –1 n 1.
f) –3 n 11.
```
```
a) n = 1 + randomNumbers.nextInt(2);
b) n = 1 + randomNumbers.nextInt(100);
c) n = randomNumbers.nextInt(10);
d) n = 1000 + randomNumbers.nextInt(113);
e) n = -1 + randomNumbers.nextInt(3);
f) n = -3 + randomNumbers.nextInt(15);
```
Computer Science & Information Technology
You might also like to view...
The tool often used for quick communications without resorting to e-mail is ________
Fill in the blank(s) with correct word
Computer Science & Information Technology
To share updated information between files and programs you can insert data. _________________________
Answer the following statement true (T) or false (F)
Computer Science & Information Technology