In a certain program, I need to generate a random value greater than 1000 (with a limit set by me for up to 5000 (maybe still a very high value)). This unique code refers to a type of registration to be performed. After solving some doubts of rand() %
with a teacher, we arrive at this code: 1000 + rand() % rand()
.
Would it be enough for what I want? And how could I demarcate it for up to 5000? This is the only part that I could not implement.