|
Description
This example uses the
srand( ) function to seed the random
number generator , we then display
some random numbers
Code
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
void main()
{
int x ;
srand((unsigned)time(NULL));
for(x=0;x<=20;x++)
printf("%i\t",rand());
}
Information
teste dwith Visual C++
, LCC Win 32
|