随机数

来源:互联网 发布:淘宝网店卖什么最赚钱 编辑:程序博客网 时间:2024/04/29 09:41

 #include<time.h>srand((unsigned) time(NULL));int num=rand() % 5;  产生0,1,2,3,4      这5个随机数之一