home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 79 / 079.d81 / anagram (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  245b  |  7 lines

  1. 10 a=rnd(-ti):dima$(80):input"word to anagram";w$
  2. 20 a$="":l=len(w$):ifw$=""thenend
  3. 30 fori=1tol:a$(i)=mid$(w$,i,1):next
  4. 40 forr=1to10:fori=1tol:source=rnd(0)*(l)+1:dest=rnd(0)*(l)+1
  5. 50 temp$=a$(dest):a$(dest)=a$(source):a$(source)=temp$:next
  6. 60 print:fori=1tol:printa$(i);:next:print:next:print:run
  7.