Created
October 12, 2011 20:46
-
-
Save jqno/1282493 to your computer and use it in GitHub Desktop.
Anagram generator from Umberto Eco's novel Foucault's Pendulum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment