Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ generate random number upper and lower bound

int randomBetween( int lowerBound, int upperBound )
{
  int upperbound, lowerbound;
  int randomBetween = rand() % (upperbound-lowerbound) + upperbound;
  return randomBetween;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #generate #random #number #upper #bound
ADD COMMENT
Topic
Name
2+4 =