| |
23.24.1.rand |
|
Item | Value | Header file | stdlib.h | Declaration | int rand(void); | Function | generates a sequence of pseudorandom numbers. Each time it is called, an integer between zero and RAND_MAX is returned. RAND_MAX will be at least 32,767. |
|
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
int i;
for(i=0; i<10; i++){
printf("%d \n", rand());
}
return 0;
}
|
|
262236772
208042609
800207362
428428949
47718728
1793958355
1543227091
1255063701
1245922717
448084510 |
|