c++生成随机数

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#define random(x) (rand()%x)

void main()
{
     srand((int)time(0));
     for(int x=0;x<10;x++)
           printf("%d/n",random(100));
}
原文地址:https://www.cnblogs.com/Fadinglemon/p/3755222.html