📜  c++生成随机数上下界-C++代码示例

📅  最后修改于: 2022-03-11 14:44:47.230000             🧑  作者: Mango

代码示例1
int randomBetween( int lowerBound, int upperBound )
{
  int upperbound, lowerbound;
  int randomBetween = rand() % (upperbound-lowerbound) + upperbound;
  return randomBetween;
}