#includestdioh#include stdlibh#includetimeh#define M 100int main int aM; int in; n=M; srand timeNULL ; for i = 0; i n; i++ ai=rand11; printf d dn iai ; 为什么只有71到99的数字前面的数没有
根据代码的逻辑,生成的随机数是通过rand()%11来得到的,这个表达式的结果是0到10之间的随机数。所以生成的随机数只会在0到10之间,而不会超过这个范围。因此,前面的数没有出现是因为它们的随机数值在0到10之间。
原文地址: https://www.cveoy.top/t/topic/ijMp 著作权归作者所有。请勿转载和采集!