2 Replies - 494 Views - Last Post: 10 April 2013 - 07:52 AM Rate Topic: -----

#1 makeitloud   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 64
  • Joined: 08-April 13

random numbers help

Posted 10 April 2013 - 07:35 AM

i dont have a code or anything but i wanted to ask a question, is there a way to out a random number through 1-6 and not 0-5 like rand()%6 but not output any zeros just 1-6 like dice, i want to make a dice program and play around.
Is This A Good Question/Topic? 0
  • +

Replies To: random numbers help

#2 neondayz   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 10
  • Joined: 02-April 13

Re: random numbers help

Posted 10 April 2013 - 07:44 AM

rand() % 6 + 1;

Was This Post Helpful? 1
  • +
  • -

#3 makeitloud   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 64
  • Joined: 08-April 13

Re: random numbers help

Posted 10 April 2013 - 07:52 AM

thank you

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1