2008/06/19

난수 생성하기

    // 초기화
srand( (unsigned int)time(NULL) );

for ( int cnt = 0; cnt < 1000; ++cnt )
{
int a;
double x;

a = rand() % (int)(1.0 * 100);
x = a / 100.0;
}

Original Post : http://neodreamer-dev.tistory.com/110

No comments :

Post a Comment