rand和srand
#include "stdafx.h"
#include <stdlib.h>
#include <time.h>
int main(int argc, char* argv[])
{
printf("Hello World!\n");
srand(time(0));
for (int i=0;i<10;i++)
{
printf("%x ",(int)rand()%1000);
}
printf("\n");
for (int j=0;j<10;j++)
{
printf("%x ",(int)rand()%1000);
}
return 0;
}