ask a C question about random number# Programming - 葵花宝典
s*e
1 楼
I used
srand((unsigned) time(NULL));
for ( int i=0;i<5;i++)
{
rand();
}
I produce the same number at the same time period such as 5 second or 3 second
.
How can I produce a random number?
srand((unsigned) time(NULL));
for ( int i=0;i<5;i++)
{
rand();
}
I produce the same number at the same time period such as 5 second or 3 second
.
How can I produce a random number?