thx i know ald
Code:/* RAND.C: This program seeds the random-number generator * with the GetTickCount, then displays 10 random integers. */ #include <stdlib.h> #include <stdio.h> #include <winbase.h> void main( void ) { int i; /* Seed the random-number generator with GetTickCount so that the numbers will be different every time we run. */ srand( GetTickCount() ); /* Display 10 numbers. */ for( i = 0; i < 10;i++ ) printf( "%6d\n", rand() ); }





Reply With Quote