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

Consequence of stimulant taking
Research at least three types of plants, that you can use in a garden to fight global warming. If you answer the best with good explanation you will be the
distance can be represented by absolute value.true or false.?
The daily rainfall during a two week period in April was: 1, 0.5, 0.3, 0, 0 ,0, 1.2, 3, 0, 1.1, 0.7, 2, 1.3, 2 inches. What was the mode during this two week pe
plz help me with this
The prefix which means not is em-, it-, I'll-,ir-
What European cultures practice was considered barbaric to the Chinese
The document written by james madison defending the constitution is known as:
A group of 140 tourist are going on a tour the tour guide rents 15 vans. each van holds 9 people. what is a division problem that could be used to find how many
Work still needs to be done to achieve our american ideal of what?