Random Numbers
srand()
- Function used to seed the random number generator.
- Starts the generator
- srand() can be run anywhere in the program but must be done.
rand() gives you a random number.
Uses:
- Simulating random events in a program.
- rolling dice
- drowing cards
- Encryption Algorithms
- Creating data sets to test your programs
Last Modified 26 September 2000