c 2b 2b generate random number upper and lower bound

Solutions on MaxInterview for c 2b 2b generate random number upper and lower bound by the best coders in the world

showing results for - "c 2b 2b generate random number upper and lower bound"
Samuel
23 Sep 2016
1int randomBetween( int lowerBound, int upperBound )
2{
3  int upperbound, lowerbound;
4  int randomBetween = rand() % (upperbound-lowerbound) + upperbound;
5  return randomBetween;
6}
7
similar questions