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

How do you solve 18b2c-12ab3+30ab?
can somebody please help meeeeeee!!! please
Clouds that form over water are usually more efficient in producing precipitation than clouds that form over land. why?
Which energy conversion occurs during the process of photosynthesis?
how can you use food labels and DRIs to make sure you get enough iron
The person who wrote most of the letters in the new testament
The base of a cube is parallel to the horizon. If the cube is cut by a plane to form a cross section, under what circumstance would it be possible for the cross
Services united is considering a new project that requires an initial cash investment of $26,000. the project will generate cash inflows of $2,500, $11,700, $13
5x - 3(1 + 2x) =24 - 4x
How did the Byzantine Empire leaders turn away the Huns and Germanic people who over took the Roman Empire?