No the modulus operator produces a remainder, there is no value that you could divide by 99 and add 1 that would produce 100.rand() % 99 + 1 will give you 100. If the random number is 99+1, do the math in your head.

98%99=98+1=99

99%99=0+1=1

197%99=98+1=99

198%99=0+1=1

etc...

but

99%100=99+1=100 //What we want

100%100=0+1=1