Limited access

Upgrade to access all content for this subject

Consider the following code segment.

    System.out.print(Math.random()*100+1);

What is printed as a result of executing the code segment?

A

A number between 0 (inclusive) and 1 (exclusive).

B

A number between 1 (inclusive) and 2 (exclusive).

C

A number between 1 (inclusive) and 101 (exclusive).

D

A number between 100 (inclusive) and 101 (exclusive).

E

A number between 1 (inclusive) and 100 (inclusive).

Select an assignment template