C++获取随机数(伪随机数)
摘要:
#include #include #include using namespace std; int main() { int i,j; //设置种子; srand((unsigned)time(NULL)); for(i=0;i<10;i++) { j=rand(); cout<<"随机数: "<<j<<endl; } return 0; } 阅读全文
posted @ 2018-05-03 17:58 Cherish丶 阅读(748) 评论(0) 推荐(0)
浙公网安备 33010602011771号