摘要:
#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); ... 阅读全文