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]
2 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]2 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
Need the answer ASAP!!!
Soloha48 [4]

Answer:

creation

Explanation:

i am not sure about this one but u will get a 5 for trying

7 0
2 years ago
PLEASE ANSWER LAST DAY OF SCHOOL. Discussion Topic
meriva

Answer:

You can't really say it matters whether it's short or long

Explanation:

There several coding language some short and some long with different purposes so it doesn't really make a difference

Although some coders have been able to shorten some codes so I'd say shorter is faster and be[er and easier to memorize

Thanks hope I was helpful

4 0
1 year ago
What is the condition for setting an alarm clock
stich3 [128]

Answer:

The time in which the alarm clock will sound

Explanation: Hope this helped please give me brainliest

6 0
2 years ago
Use the function varimp() on the output of train() and save it to an object called imp:_____.
Orlov [11]

Use the function varimp() on the output of train() and save it to an object called imp object.

<h3>What is the classification that has More than Two Classes and the Caret Package</h3>

In the Classification that has More than Two Classes and the Caret Package section, one need to use the methods that can be able to adapt to higher  forms or dimensions and through a lot of different machine learning algorithms.

Note that varImp is seen as a generic method for calculating variable .

Hence, Use the function varimp() on the output of train() and save it to an object called imp object.

Learn more about Computer function from

brainly.com/question/17048576

#SPJ1

5 0
1 year ago
Using language c, find the nth Fibonacci, knowing that nth Fibonacci is calculated by the following formula: - If n = 1 Or n = 2
Nina [5.8K]

Answer:

#include <stdio.h>

int fib(int n) {

 if (n <= 0) {

   return 0;

 }

 if (n <= 2) {

   return 1;

 }

 return fib(n-1) + fib(n-2);

}

int main(void) {

 for(int nr=0; nr<=20; nr++)

   printf("Fibonacci %d is %d\n", nr, fib(nr) );

 return 0;

}

Explanation:

The code is a literal translation of the definition using a recursive function.

The recursive function is not per se a very efficient one.

4 0
2 years ago
Other questions:
  • When you park on a hill, think about which way _____.
    6·2 answers
  • When network cards are communicating, bits can occasionally be corrupted in transmission?
    5·1 answer
  • What can a scientist do if he repeats and experiment and gets diffrent results?
    5·1 answer
  • Which of the following is a programming language that permits Web site designers to run applications on the user's computer?
    15·1 answer
  • The base 10 number 18 is equal to which base 16 number?<br><br> 10<br><br> 12<br><br> 14<br><br> 16
    11·1 answer
  • in Python we use IDE ( lntegrated Dvelopment Environment ) to write down the program data points of difference between script mo
    13·1 answer
  • PLS HURRY<br> Look at the image below
    8·1 answer
  • What is cache memory?Mention its importance. ​
    12·1 answer
  • Non linear editing can cause _____ where edit and re-edit and re-edit again can cause video to be less true than the original ma
    11·1 answer
  • The standard naming convention prefix tag for a query used to identify the object type is?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!