1.获取特定实数区间内的随机浮点数 给定区间[a, b],其中a, b为实数,通过下述代码可获得该区间内的随机浮点数x srand((unsigned)time(NULL)); x = a + (b-a)*rand()/(RAND_MAX*1.0); 待续