摘要:
View Code #include <iostream> #include <stdlib.h> #include <time.h> using namespace std; int main() { int a=2,b=9; srand((unsigned)time(NULL)); for(int i=0; i<10;i++ ) cout<<rand()%(b-a)+a<<endl; cout << endl; return 0; }<一>生成[a,b)的随机整数,使用rand()%(... 阅读全文
posted @ 2012-04-26 19:33
爱嘉牛LA
阅读(617)
评论(0)
推荐(1)

浙公网安备 33010602011771号