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

If you evaluate n x ( y + z) by writing it as ( n x y) + ( n x z ), you have used the —————-.
how musch would a 20% tip be fir a sit down resturant
The equation of y=2x-1 with a translation of 3 units to the right followed by a translation of 1 unit down.
Please answer this correctly
what is germination​
Which number sentence does the following represent?
Write an equation of the line passing through each of the following pairs of points. a (−10, 4), (2, −5)
Need HELP!!! For all, I’m truly confused
In thefirst round of agame show, Ellie lost200 points. In the secondround, she gained 500points. What is her scorenow?S​
The width of a rectangle is 1/2 of its length. What are the sides of the rectangle if its perimeter is 63 in.?Answer:The width is _ in, the length is in_