C语言如何编程产生随机数

日期:2013-10-25 07:39:16 人气:1

C语言如何编程产生随机数

  楼主你好,给你个最简单的C程序 #include#include//这个是随机数函数rand()所在头文件,就像使用scanf 要包含stdio.h。void main(){ int i=100; while(i--) { printf("-------%d---",rand()%1000); }}
    A+
热门评论