This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/srand.c

17 lines
285 B
C

#include <stdio.h>
#include <stdlib.h>
void main()
{
int i;
srand( 982 );
for( i = 1; i < 10; ++i ) {
printf( "%d\n", rand() );
}
srand( 982 ); /* start sequence over again */
for( i = 1; i < 10; ++i ) {
printf( "%d\n", rand() );
}
}