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

What good news dose shylock get in act 3 scene 1
What effect does Bryant's use of personification of nature have on the theme of the poem "Thanatopsis"
The meaning of look before you leap. Think today and speak tomorrow. Is it similar meaning or contradictory
What type of public policy or regulation topic best relates to this map
PLEASE HELP ME!!! NOT GOOD AT MATH.
The juices in the stomach break down food into a thick liquid called
Anti-infectives are used to treat urinary tract infections which include which anatomical structures? (select all that apply.)
The process of determining the boundaries of districts for the purpose of electing political officials is called
What is 5.75% of $6,000? (Express answer as dollars as cents.)
Why did j. j. thomson reason that electrons must be a part of the atoms of all elements?