answersLogoWhite

0

What is rand function?

Updated: 12/23/2022
User Avatar

Wiki User

13y ago

Best Answer

If you are referring to PHP's rand function then.

The rand function is a function that is used to generate a random number between and including two fixed values or two varibles.

An example of this is:

$rand1 = rand(1,9);

echo ($rand1);

?>

This will generate a number between 1 and 9 including 1 and 9

Another exampe of this is:

$value1 = 1;

$value2 = 9;

$rand1 = rand($value1,$value2);

echo ($rand1);

?>

This is also generate a number between 1 and 9 including 1 and 9.

I hope this has helped you.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is rand function?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which function is used to randomize number in Excel?

There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.


What would be the result of trying the function INT(RAND)(5) into cell B1?

what would be the result of typing the function =INT(RAND()*5) into cell B1?


How do you generate random numbers in Excel?

You can use the RAND function or the RANDBETWEEN function.


What is rand function in c plus plus?

The rand() function returns an integer (int) value that represents a pseudo-random number between 0 and RAND_MAX, RAND_MAX being a constant declared in the run-time library. Each time rand() is invoked, a different value is returned.


What is randomize function in c plus plus?

You can use rand(). Make sure that you use srand()to generate the seed for rand() (if you do not, you get so called pseudo random numbers).


Why does the RAND function in Excel not include 1 in its range?

It is designed to get numbers from zero to below 1. To get numbers from 1 or more, you multiply its result by the number you need. To get numbers from 1 to 2000, not including 2000, multiply like this:=RAND() * 2000


Is Remington Rand the same company as Sperry-Rand?

Yes and no. Remington Rand merged with Sperry Gyroscope, then split into Remington and Sperry Rand. The computer division Univac was transfered in the split from Remington Rand to Sperry Rand.


Who is writer rand?

Ayn Rand


What is the market cap for Rand Capital Corporation RAND?

As of July 2014, the market cap for Rand Capital Corporation (RAND) is $19,876,865.20.


How do you get a random number from a group of numbers in C?

Random numbers cannot be generated programatically. For pseudo-random numbers use function 'rand'.


How do you print 10 ramdom numbers by using for loop?

11


Where is the Rand?

The Rand is the currency of South Africa.