BasicallyIzzy8161 BasicallyIzzy8161
  • 01-07-2021
  • Computers and Technology
contestada

What will be the range of the random numbers generated by the following code snippet? rand() % 50 + 5;

Respuesta :

isabellarw123
isabellarw123 isabellarw123
  • 02-07-2021

Answer:

Between 5 to 54

Answer Link
fichoh
fichoh fichoh
  • 02-12-2021

The function given would generate random number in the range 5 to 54.

  • The rand() function is used C++ to generate random values with a given range.

  • The value, 5 in the function, represents the least value in the range.

  • The maximum value in the range can be calculated as (50 + 5) - 1 ;

  • This means that the maximum value in the range would be (55 - 1) = 54.

Hence, the range of value generated would be (5, 54)

Learn more : https://brainly.com/question/22841107

Answer Link

Otras preguntas

Which action should be followed if a servere thunderstorm warning is issued
In exchange for constructing the railroad the railroad companies received what
How is a scientific law different from a scientific theory? A. A theory becomes a law after a long period of time has passed. B. theory is why something happen
Which is true of Franklin Delano Roosevelt?
Why is it important to live peacefully in this world ?
Subtract.(4x^2 + 8x - 2) - (2x^2 - 4x + 3)Enter your answer, in standard form.​
Can the Spanish word estadounidense mean American and United States?
Please please help me out
what are the basic responsibilities of citizens? what are the basic responsibilities of governments?
For which intervals is the function negative Select each correct answer (1,4) (-3,1) (-2.5,2.5) (4,infinity) (-infinity, -3) (-1.5, 4.2)