Valery, that would be from 1 to 101, same deal. R adds generated number to existing value (which is why you have S before it). The range is controlled by what you pass to R: it generates a number from 0 inclusive to its argument inclusive. So if you write R100, possible values would be first 100 natural numbers (1..100) plus number 0, totaling 101 possible values (one more than what you passed to R). Thus R99 would give 100 possible values.
Conditions are correct in both cases, there are 5 numbers satisfying them. Although I feel you wanted 5% chance of success and not 5% chance of failure.