随机函数是rand(),头文件为<cstdlib>. 用法: int res = rand()%b + a;. res是从a开始(包括a)连续数b个数这个区间中的一个随机数,( res = [a,b) );.
確定! 回上一頁