1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
RSB [31]
3 years ago
6

Which of the following expressions yields an integer between 0 and 100, inclusive? Question 5 options: (int)(Math.random() * 100

+ 1) (int)(Math.random() * 101) (int)(Math.random() * 100) (int)(Math.random() * 100) + 1
Computers and Technology
1 answer:
Alex17521 [72]3 years ago
3 0

Answer:

(b) (int)(Math.random() * 101)

Explanation:

Given

min = 0 --- minimum

max =100 --- maximum

Required

Java expression to generate random integer between the above interval

The syntax to do this is:

(int)(Math.random((max - min) + 1) + min)

Substitute the values of max and min

(int)(Math.random((100 - 0) + 1) + 0)

Simplify the expression

(int)(Math.random(100 + 1) + 0)

(int)(Math.random(101) + 0)

(int)(Math.random(101))

Hence, the right option is:

(b) (int)(Math.random() * 101)

You might be interested in
Hi Lesiana, After your presentation last week, the manager thinks an in-house solution is the way to go. Although our programmer
zlopas [31]

The Hierarchical drawing of the In- House solutions includes Four categories such as product, service, training, support and about.

<h3>What is Hierarchical drawing?</h3>

Hierarchical drawing is also known as Layered Graph Drawing which includes the drawing in the vertices and are made on the Horizontal rows and layers.

The complete solution is attached below.

The In-House solutions' hierarchical diagram covers four categories, including product, service, training, support, and about.

Learn more about Hierarchical drawing here:

brainly.com/question/26031625

#SPJ1

 

3 0
2 years ago
Write a python program to print the following series 3..10..31..94......n​<br><br>Pls answer fast..
butalik [34]

I've included my code in the picture below. Best of luck

8 0
3 years ago
Images of movies are common types of software true or false
topjm [15]

Answer:

True

Explanation:

3 0
3 years ago
ASAP!!!!!!! 6.From Excel to PowerPoint, you can copy and paste
KIM [24]
Your answer is A.

<em>Let me know if you have any other questions! ♥</em>
4 0
4 years ago
How would a password be a good password, how, and why.
Pachacha [2.7K]

Answer:

Complicated

Explanation:

A good password is something that can't just be guessed like cupcake it has to be like CUp_c3k3_456

4 0
3 years ago
Read 2 more answers
Other questions:
  • Assume that getPlayer2Move works as specified, regardless of what you wrote in part (a) . You must use getPlayer1Move and getPla
    14·1 answer
  • This operating system was used by individual computers and required users to type commands.
    9·1 answer
  • Why are computer messages encapsulated?
    13·1 answer
  • Nina aspires to be a digital media specialist. What should Nana be familiar with in order to pursue this career?
    9·2 answers
  • What to do when you strip a screw
    10·2 answers
  • True/False - According to CP-14 Sale of Modular Homes, a licensee who sells land and a modular home to be affixed to the land, t
    11·1 answer
  • What are the reasonsfor documenting business rules​
    6·1 answer
  • Search..
    14·1 answer
  • Pls help I will mark you the brainliest
    9·2 answers
  • You are planning to depart on a flight from area 2 to area 4 in 12 hours. What weather is forecast to occur along your route?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!