I need help generating numbers?

closed account (4wRjE3v7)
if I use the code
random = rand() % 100 + 1;

how do I generate a number from 500 to 1500?

thanks
rand() % 1001 + 500;
Last edited on
closed account (4wRjE3v7)
Thank you so much!!
Please do not modify your original posts to get rid your question. It makes it difficult for people searching for the problem to find it. It is also disrespectful to people who helped you out and makes it more likely your questions will go unanswered here in the future.
Topic archived. No new replies allowed.