标签: c
我必须使我的随机函数通过当前系统生成时间生成0到9之间
答案 0 :(得分:1)
您可以使用模数运算符:
milliseconds % 10;
见这里:http://www.cprogramming.com/tutorial/modulus.html