3.1.1.8 Random Number Generation In Programming Languages. Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Syntax for random number generation.

A

int ran = Math.random( );

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Syntax for number generator between two values.

A

min = Math.ceil(min);

max = Math.floor(max);

return Math.floor(Math.random() * (max - min) + min);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly