- Green versionCheck
- Green versionCheck
- Green versionCheck
How to use
After opening the program, enter the minimum value, maximum value, and number, and click Generate to quickly and automatically generate random numbers.
The use of random numbers
Random numbers are used in different techniques of statistics, such as when drawing representative samples from a statistical population, or when assigning experimental animals to different experimental groups, or when performing Monte Carlo simulations. Wait while calculating.
There are many different ways to generate random numbers. These methods are called random number generators. The most important characteristic of random numbers is that the subsequent number it generates has nothing to do with the previous number.
True random numbers are generated using physical phenomena: such as coin toss, dice, spinning wheels, noise using electronic components, nuclear fission, etc. Such random number generators are called physical random number generators. Their disadvantage is that their technical requirements are relatively high.
In practical applications, pseudo-random numbers are often sufficient. These sequences are "seemingly" random numbers, but in fact they are generated by a fixed, repeatable calculation method. Random numbers generated by computers or calculators have a long periodicity. They are not truly random since they can actually be calculated, but they have statistical characteristics similar to random numbers. Such a generator is called a pseudo-random number generator.
In truly critical applications, such as in cryptography, one generally uses truly random numbers.
C language, C++, C#, Java, Matlab and other programming languages and software have corresponding random number generation functions, such as rand, etc.
How to generate random numbers
rand_max is a macro that defines the maximum random number generated. The random numbers you want to generate are all integers. If you want to limit the range, just use remainder. rand()()%n, n is the range you specify. , what is generated at this time is a random number of 0-n. If you want to generate a random number of n-m, just generate a random number of 0-(m-n) first, and then add n. If you do not set it, the random number generated every time It's the same, you need to use the seed to set it~~srand()() usually puts time(0) in it, you will understand after checking it.
it works
it works
it works