VC6 X 20 set , OK
(高顯忠, sjgau4311@gmail.com, 2011-04-05 10:40)
1樓
9171
6105
22820
30945
31677
26140
17050
15621
13827
2681
Press any key to continue
/* RAND.C: This program seeds the random-number generator
* with the time, then displays 10 random integers.
*/
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
void main( void )
{
int i;
/* Seed the random-number generator with current time so that
* the numbers will be different every time we run.
*/
srand( (unsigned)time( NULL ) );
/* Display 10 numbers. */
for( i = 0; i < 10;i++ )
printf( " %6d\n", rand() );
}