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

my sis needs help asap
write composition about patience pays?​
essay about how the jewish people were persecuted in germany
Which is an example of an external influence affecting food choices? A. availability of canned foods B. religious beliefs with specific food laws C. increases i
Choose the correct question word based on the answer provided:
The term serotoninergic refers to a neurotransmitter that releases a hormone in response to physical or mental stress. please select the best answer from the ch
What year did germany declare war on russia and france?.
what foods can be stored in water and or ice
A solution has [H3O+] = 2.8x10-5 M. Use the ion product constant of water K. = [H30 - ) [OH-] to find the [OH-] of the solution. Express your answer to two sign
why is it important to know your rights and responsibilities​