Skip to content

Instantly share code, notes, and snippets.

@jqno
Created October 12, 2011 20:46

Revisions

  1. jqno created this gist Oct 12, 2011.
    15 changes: 15 additions & 0 deletions anagrams.bas
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    10 REM anagrams
    20 INPUT L$(1),L$(2),L$(3),L$(4)
    30 PRINT
    40 FOR I1=1 TO 4
    50 FOR I2=1 TO 4
    60 IF I2=I1 THEN 130
    70 FOR I3=1 TO 4
    80 IF I3=I1 THEN 120
    90 IF I3=I2 THEN 120
    100 LET I4=10-(I1+I2+I3)
    110 LPRINT L$(I1);L$(I2);L$(I3);L$(I4)
    120 NEXT I3
    130 NEXT I2
    140 NEXT I1
    150 END