// C++#include <iostream>using std::cout;using std::cin;using std::endl;#include <ctime>int rand(const int&, const int&);int main(){const int MIN = 1;const int MAX = 5677;srand(time(0)*time(0));for(int i=0; i<3; i++)cout << rand(MIN, MAX) << endl;system("pause");return 0;}inline int rand(const int& MIN, const int& MAX){const int COUNT = MAX-MIN + 1;return (double(rand())/RAND_MAX)*(COUNT) + MIN;}
下面是引用文弥卡儿于2005-12-27 02:11发表的 :看不太懂~~但是应该也是没中..如果中了会通知当事人吗??