c语言怎么生成随机数?

日期:2017-09-03 01:49:24 人气:1

c语言怎么生成随机数?

你好! 完整的代码,红圈处就是从上面100个数字中抽取到的数字: #include #include //生成随机数用 #include //利用时间生成种子 #include int main(){ int i; int a[100]; srand( time(NULL) ); //生成种子 f
    A+
热门评论