HELP~PLZ~how to generate four random numbers at one time?

Can anyone tell me how to generate four random numbers at one time, but can not repeat the digits. For example 1234 is allowed, but 1223 is not allowed.
Thank You

Comments

  • : Can anyone tell me how to generate four random numbers at one time, but can not repeat the digits. For example 1234 is allowed, but 1223 is not allowed.
    : Thank You
    :

    it's only a matter of algorithm. get 4 random number and check it if there's any repeatition.
    store each number into an array, so you can check for repeatition easier.
    after all is done, then you can concatenate 4 number into 1.

    hope this would help

    :-)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion