Home > Article > Software Tutorial > How to set up random function
The editor of php teaches you how to set up the random function. The random function is a function used to generate random numbers, which can be used to increase the fun and flexibility of the program. In practical applications, we can control the range and method of random numbers by setting the parameters of the random function to meet different needs. Next, we will introduce in detail how to set up the random function so that you can easily handle various random number generation needs.
Step one: First, you need to open a new excel chart, as shown in the picture.
Step 2: As shown in the picture, the next operation is to place the cursor in the cell, enter "=rand()", or insert the function formula rand , we see the following requirements, input according to the following requirements, return uniformly distributed random numbers greater than or equal to 0 and less than 1, and return a value every time the worksheet is calculated.
Step 3: As shown in the picture, then press Enter.
Step 4: As shown in the picture, finally copy the filling formula to the right and downward, and you will get a series of random numbers greater than or equal to 0 and less than 1, our random The function demonstration is completed.
The above is the detailed content of How to set up random function. For more information, please follow other related articles on the PHP Chinese website!