Random number generator help

Hello guys,
can you help me with this?

X=random(1,4)

i need Y=random(1,4) with X excluded

"random(1,4)%X" or "X + rand(1,4)%4" does not work

Best Answer

  • SocksSocks London, UK.Posts: 12,822
    edited April 2016 Accepted Answer

    X = random(1,4)
    Y = (X+random(0,2))%4+1

Answers

Sign In or Register to comment.