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

PLEASE HELP IS THE OLD YELLER !!!!!!!!!!!! When does Mrs. Coates first demonstrate that she recognizes Travis is taking on his father's role? A. when Travis go
If a 21 ounce box of cereal costa $2.94,what is the unit price.
outlaws of the Wild West were heroes of their time
A grain storage bin has the following dimensions, 11 feet high, 28 feet long and 12 feet wide. The volume of 1 bushel is 2200 cubic inches or 1.273 cubic fee
72 - (blank) + 20 = 70 what number is the blank
solve the equation for C f=9/5c+32
are there forests in Hungary
Juan Ramirez sells suits in a major department store on weekends. he earns a commission of 5 percent on the first ten suits, and if he sells more than ten, he e
which is an example of an intentional injury
_ is 8% of 200, please help and show work, thanks