Hello,

I am trying to make a random numbrt generator that choses 5 numbers between 1 and 8. The problem i am having is that if the first number is 6 then the sequence will always be 61253, and if it is 1 then the sequence is always 12537, and so on for all 1 to 8. Any sugestions would be appreciated.

Here is my code:-

jmp1:

random temp

if sw1 = 1 then goto start

goto jmp1

start:

pause 2000

lcdout $fe, 1

number1:

random temp

if temp > 8 then number1

let num1 = temp

lcdout $fe, 1, dec num1

number2:

random temp

if temp > 8 then number2

if temp = num1 then number2

let num2 = temp

lcdout " ", dec num2

number3:

random temp

if temp > 8 then number3

if temp = num1 then number3

if temp = num2 then number3

let num3 = temp

lcdout " ", dec num3

number4:

random temp

if temp > 8 then number4

if temp = num1 then number4

if temp = num2 then number4

if temp = num3 then number4

let num4 = temp

lcdout " ", dec num4

number5:

random temp

if temp > 8 then number5

if temp = num1 then number5

if temp = num2 then number5

if temp = num3 then number5

if temp = num4 then number5

let num5 = temp

lcdout " ", dec num5

goto jmp1

end

Best regards

Bob...

## Bookmarks