CLS
INPUT "Word to Scramble: ", w$, "peter"

N = LEN(w$)

Dim scramble$[15]
Dim temp$[15]
z=1

!'''==================================
Top:
While z < 10
Gosub Here
z=z+1
Repeat 
End

!'''==================================
Here:
FOR x = 1 TO N
scramble$[x] = MID$(w$, x, 1)
NEXT x

FOR x = 1 TO N
mixup = Floor(RND * N) + 1
temp$[x] = scramble$[mixup]
scramble$[mixup] = scramble$[x]
scramble$[x] = temp$[x]
NEXT x

FOR x = 1 TO N
mix$ = mix$ + scramble$[x]
NEXT x

Print mix$

w$ = mix$
mix$ = ""

Return