生成随机数

#include <stdlib.h> 
#include <iostream.h> 
#include <time.h>

void main(){

    srand( (unsigned)time( NULL ) ); 

    for(int i=0;i<100000;i++){ 

        cout<<rand()<<endl; 
    }

} 
//rand()*x表示生成0-x的数
原文地址:https://www.cnblogs.com/jamsbwo/p/4100272.html