Random

How can I create two integer random numbers?

Best Answer

Answers

  • Hi,
    you can use functions RANDOM and RANDOMIZE. Please see Dynamics NAV for more information
  • RockWithNAVRockWithNAV Member Posts: 1,139
    Kishorm's suggestion will work.

    But 2 digit wont be random always once it holds a 99 value then what you are going to do??
  • KishormKishorm Member Posts: 921
    But 2 digit wont be random always once it holds a 99 value then what you are going to do??

    The above code is to generate two separate random numbers between 1 and 1000 - it is not to generate two random digits.

    The generated numbers should be (pseudo-)random but they won't necessarily be unique - this wasn't a requirement in the initial post so the sample code didn't try to achieve this.
Sign In or Register to comment.