摘要: #include <math.h>#include <stdlib.h>#include <stdio.h>#include <unistd.h>int main(int argc, char ** argv) { float randpr, intrval, r = 10.0; while(true){ randpr = (float)rand()/RAND_MAX; intrval = -(1/r) * (float)log(1-randpr); printf("%f\n", intrval); sleep(1); ... 阅读全文
posted @ 2013-03-26 15:54 zaleilynn 阅读(485) 评论(0) 推荐(0) 编辑