#include <iostream>#include <time.h>using namespace std;
int main(){srand( (unsigned)time( NULL ) );for (int i =0;i<10 ;i++ ){ cout << rand()%101/100.0 <<endl; // 101 这个数用随机数的范围代替就可以了。}return 0;}
[此贴子已经被作者于2006-4-5 15:47:53编辑过]