I need help generating numbers?

Feb 20, 2013 at 3:54am
closed account (4wRjE3v7)
if I use the code
random = rand() % 100 + 1;

how do I generate a number from 500 to 1500?

thanks
Feb 20, 2013 at 4:05am
rand() % 1001 + 500;
Last edited on Feb 20, 2013 at 4:05am
Feb 20, 2013 at 4:14am
closed account (4wRjE3v7)
Thank you so much!!
Feb 20, 2013 at 7:00am
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.