Ask your own question, for FREE!
Computer Science 22 Online
SourMunchkin7806:

In the Guess My Number game, there is a lower limit and an upper limit for the range of possible numbers to guess. If the lower limit were inclusive and the upper limit exclusive, which expression would properly generate values for the secret number?

SourMunchkin7806:

@Ultrilliam

SourMunchkin7806:

I already looked there

Elsa213:

Eh. e.e

Elsa213:

@BenLindquist

BenLindquist:

uh???????????? elsa 123

SourMunchkin7806:

@JustSaiyan

SourMunchkin7806:

@Ultrilliam

Ultrilliam:

@Vocaloid seems more like a math solution

SourMunchkin7806:

Its Java

SourMunchkin7806:

Question 3(Multiple Choice Worth 4 points) In the Guess My Number game, there is a lower limit and an upper limit for the range of possible numbers to guess. If the lower limit were inclusive and the upper limit exclusive, which expression would properly generate values for the secret number? (int)(Math.random() * (upper − lower) ) + lower (int)(Math.random() * (upper − lower + 1) ) + lower (int)(Math.random() * (upper − lower) ) + lower + 1 (int)(Math.random() * (upper − 1 − lower) ) + lower + 1 (int)(Math.random() * (upper − lower + 1) ) + lower − 1

SourMunchkin7806:

So can you help?

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!