• 2022-06-19
    如何使用C构造一个伪随机数生成器生成0-1之间的数?
    A: srand((unsigned)time(NULL));
    a = rand() % 10 / 10;
    B: srand((unsigned)time(NULL));
    a = rand() % 11 / 10;
    C: srand((unsigned)time(NULL));
    a = rand() % 10 / 11;
    D: srand((unsigned)time(NULL));
    a = rand() % 9 / 10;