这是一个较老的不太复杂的算法 /* This algorithm is mentioned in the ISO C standard, here extended for 32 bits. */intrand_r (unsigned int *seed){ unsigned int next = *seed; int result; next *= 1103515245; next += 12345; result = (unsigned int) (next / 65536) % 2048; next *= 1103515245; next += 12345; result <<= 10; result ^= (unsigned int) (next / 65536) % 1024; next *= 1103515245; next += 12345; result <<= 10; result ^= (unsigned int) (next / 65536) % 1024; *seed = next; return result;}/* This algorithm is mentioned 你的当前访问异常,请进行认证后继续阅读剩余内容。 提交