L lhlh_0_0 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-07 #1 请教c++中的随机函数如何使用,取值在0-1之间;
Z zw84611 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-07 #2 srand( (unsigned long)time( NULL ) ); int i=rand() % 2;
S sg_zeng Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-31 #3 srand( (unsigned long)time( NULL ) ); double num = 1.0 * rand() /RAND_MAX;