Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using Java, generate a random number between negative 0.02 (inclusive) and 0.1 (exclusive). ONLY MATH.RANDOM() CAN BE USED. I am having a hard time generating

using Java, generate a random number between negative 0.02 (inclusive) and 0.1 (exclusive).

ONLY MATH.RANDOM() CAN BE USED.

I am having a hard time generating random number between those ranges, this is how I did it, but I am not sure if it is correctly generating random numbers between the range specified.

double random = ((Math.random() * 0.1) + -0.02);

if this is not correct, then how do I do it?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

2. When is the job to be completed?

Answered: 1 week ago

Question

What are the steps involved in the HR planning process?

Answered: 1 week ago