Solved

Which of the Following Expression Yields an Integer Between 0

Question 7

Multiple Choice

Which of the following expression yields an integer between 0 and 100, inclusive?


A) (int) (Math.random() * 100 + 1)
B) (int) (Math.random() * 101)
C) (int) (Math.random() * 100)
D) (int) (Math.random() * 100) + 1

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions