Which of the following will generate a random number between 0 and 5?

a.
```
Math.random() * 5;
```
b.
```
Math.floor(Math.random() * 6));
```
c.
```
Math.random() * 5 + 1;
```
d.
```
Math.floor(Math.random() * 4 + 1);
```



b.
```
Math.floor(Math.random() * 6));
```

Computer Science & Information Technology

You might also like to view...

To use operators on class objects, they must be overloaded, with the exception of operators __________, ___________and ____________.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

What’s the difference between a linear gradient and a radial gradient?

What will be an ideal response?

Computer Science & Information Technology

Saving a file as Word 97-2003 format will save it with the ________ extension

A) .ppt B) .doc97 C) .docx D) .doc

Computer Science & Information Technology

What is the difference between a manual address lease and a dynamic address lease?

What will be an ideal response?

Computer Science & Information Technology